IP Library Granted Patent US 11,657,032
Granted Patent B2
US 11,657,032 · App. 17/444,078 · Granted May 23, 2023

Compacted table data files validation

Inventors: Sandeep Gottimukkala (Santa Clara, CA); Nitin Motiani (Santa Clara, CA); Prateek Gaur (San Jose, CA)
Assignee: ThoughtSpot, Inc.
G06F16/2358G06F16/221G06F16/2255G06F16/2282
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,657,032
App. No.
17/444,078
Granted
May 23, 2023
Kind
B2
Abstract

Database replay log compaction verification includes identifying at least one replay log of a table that includes first database manipulation commands; obtaining a compacted replay log that includes second database manipulation commands that are insert commands, where an insert command includes a column and a corresponding value; replaying, to obtain a first replay result, the first database manipulation commands; replaying, to obtain a second replay result, the second database manipulation commands; and, responsive to one row of the first replay result not matching a corresponding row of the second replay result, sending a notification including a non-match. Replaying the first database manipulation commands includes identifying condition columns of the table; responsive to the condition columns not including the column, obtaining a row corresponding to the insert command, where the row includes a modified value of the corresponding value of the column; and adding the row to the first replay result.

Claims (71)

1. A method for database replay log compaction verification, comprising:

identifying at least one replay log of a table, the at least one replay log comprising first database manipulation commands;

obtaining a compacted replay log of the table, the compacted replay log comprising second database manipulation commands,

wherein the second database manipulation commands are insert commands, and

wherein an insert command of the first database manipulation commands includes a column and a corresponding value for the column;

replaying, to obtain a first replay result, the first database manipulation commands, wherein replaying the first database manipulation commands comprises:

identifying condition columns of the table, wherein the condition columns are used in at least one condition of the first database manipulation commands;

obtaining a row corresponding to the insert command, wherein obtaining the row corresponding to the insert command comprises:

including in the row one of a modified value of the corresponding value of the column or the corresponding value based on whether the condition columns include the column of the insert command;

adding the row to the first replay result;

replaying, to obtain a second replay result, the second database manipulation commands, wherein replaying the second database manipulation commands comprises:

determining whether to include in rows of the second replay result modified values of values of columns based on the condition columns; and

responsive to one row of the first replay result not matching a corresponding row of the second replay result, sending a notification including a non-match.

2. The method of claim 1 , wherein the column is of type string.

3. The method of claim 2 , wherein the modified value is a hash of the corresponding value.

4. The method of claim 1 ,

wherein the column is a first column and the corresponding value is a first value,

wherein the insert command further includes a second column and a second corresponding value for the second column,

further comprising:

responsive to the second column being of a type other than string, including the second corresponding value in the row.

5. The method of claim 1 , wherein adding the row to the first replay result comprises:

adding a hash value of the row to the first replay result.

6. The method of claim 1 , further comprising:

comparing a first hash value of the one row of the first replay result to a second hash value of the corresponding row of the second replay result to determine whether the one row of the first replay result matches the corresponding row of the second replay result.

7. The method of claim 1 , wherein replaying, to obtain a second replay result, the second database manipulation commands comprises:

obtaining the corresponding row of the second replay result; and

responsive to the one row matching the corresponding row of the second replay result, obtaining another row of second replay result for comparing to a corresponding row of the first replay result.

8. The method of claim 1 , wherein the compacted replay log is a compacted version of the at least one replay log that has been generated using a compaction process.

9. A method for replay log compaction verification, comprising:

replaying, to obtain a first replay result, first database manipulation commands of at least one replay log, wherein the first database manipulation commands comprises at least one of an update command or a delete command;

replaying, to obtain a second replay result, second database manipulation commands of a compacted replay log, wherein the second database manipulation commands are insert commands, and wherein the compacted replay log is a compacted version of the first replay log that has been generated using a compaction process; and

responsive to a row of the first replay result not matching a corresponding row of the second replay result, sending a notification indicating a non-match corresponding to the row of the first replay result.

10. The method of claim 9 , further comprising:

responsive to the first replay result matching the second replay result, deleting the at least one replay log.

11. The method of claim 9 , wherein replaying, to obtain a first replay result, the first database manipulation commands of at least one replay log comprises:

identifying condition columns of the first database manipulation commands; and

replacing a first value of a field included in a first command in the first database manipulation commands with a hash value responsive to a determination that the field is not included in the condition columns.

12. The method of claim 9 , further comprising:

obtaining a first hashed row value for the row of the first replay result; and

obtaining a second hashed row value for the corresponding row of the second replay result.

13. The method of claim 12 , further comprising:

comparing the first hashed row value and the second hashed row value to determine whether the row of the first replay result matches the corresponding row of the second replay result.

14. A device, comprising:

a memory; and

a processor, the processor configured to execute instructions stored in the memory for database replay log compaction verification, the instructions comprise instructions to:

identify at least one replay log of a table, the at least one replay log comprising first database manipulation commands;

obtain a compacted replay log of the table, the compacted replay log comprising second database manipulation commands,

wherein the second database manipulation commands are insert commands, and

wherein an insert command of the first database manipulation commands includes a column and a corresponding value for the column;

replay, to obtain a first replay result, the first database manipulation commands, wherein to replay the first database manipulation commands comprises to:

identify condition columns of the table, wherein the condition columns are used in at least one condition of the first database manipulation commands;

obtaining a row corresponding to the insert command, wherein obtaining the row corresponding to the insert command comprises:

responsive to the condition columns not including the column of the insert command, including a modified value of the corresponding value of the column in the row; and

responsive to the condition columns including the column of the insert command, including the corresponding value of the column in the row;

add the row to the first replay result;

replay, to obtain a second replay result, the second database manipulation commands; and

responsive to one row of the first replay result not matching a corresponding row of the second replay result, send a notification including a non-match.

15. The device of claim 14 , wherein the column is of type string.

16. The device of claim 15 , wherein the modified value is a hash of the corresponding value.

17. The device of claim 14 ,

wherein the column is a first column and the corresponding value is a first value,

wherein the insert command further includes a second column and a second corresponding value for the second column, and

wherein the processor is further configured to execute instructions stored in the memory to:

responsive to the second column being of a type other than string, include the second corresponding value in the row.

18. The device of claim 14 , wherein to add the row to the first replay result comprises to:

add a hash value of the row to the first replay result.

19. The device of claim 14 , wherein the processor is further configured to execute instructions stored in the memory to:

compare a first hash value of the one row of the first replay result to a second hash value of the corresponding row of the second replay result to determine whether the one row of the first replay result matches the corresponding row of the second replay result.

20. The device of claim 14 , wherein to obtain the second replay result, the second database manipulation commands comprises to:

obtain the corresponding row of the second replay result; and

responsive to the one row matching the corresponding row of the second replay result, obtain another row of second replay result for comparing to a corresponding row of the first replay result.

Assignments (2)
SECURITY INTEREST Recorded Mar 7, 2025
From: THOUGHTSPOT, INC.; THOUGHTSPOT, LLC
To: TRIPLEPOINT CAPITAL LLC
Reel/Frame 070442/0499 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 14, 2021
From: GOTTIMUKKALA, SANDEEP; MOTIANI, NITIN; GAUR, PRATEEK
To: THOUGHTSPOT, INC.
Reel/Frame 057795/0140 →
Continuity (1)
Related Publication 20230035166A1 · Feb 2, 2023