IP Library Granted Patent US 11,899,560
Granted Patent B2
US 11,899,560 · App. 17/730,904 · Granted Feb 13, 2024

Automatic correctness validation of database management systems

Inventors: Mathieu Baptiste Demarne (Seattle, WA); Timothy Underwood Johnson (La Mesa, CA); Miso Cilimdzic (Laguna Niguel, CA)
Assignee: MICROSOFT TECHNOLOGY LICENSING, LLC
G06F11/3612G06F8/71G06F16/2365
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,899,560
App. No.
17/730,904
Granted
Feb 13, 2024
Kind
B2
Abstract

The automatic detection of inconsistencies in a database system is described. A first signature and a second signature are received. The first signature is a signature of a result of a first execution of the query against a database by a first version of database engine program code. The second signature is a signature of a result of a second execution of the query by a second version of the database engine program code. A determination is made of whether the first signature and the second signature match. In response to the first signature and the second signature failing to match, an inconsistency report regarding at least one of the first or second versions of the database engine program code is generated and remediation regarding at least one of the first or second versions of the database engine program code is performed.

Claims (76)

1. A database system comprising:

a processor; and

at least one memory device that stores system program code to be executed by the processor, the system program code comprising:

a correctness verifier configured to:

receive a first signature and a second signature, the first signature a signature of a result of a first execution of a query against a database by a first version of database engine program code, and the second signature a signature of a result of a second execution of the query by a second version of the database engine program code;

determine whether the first signature and the second signature match; and

in response to the first signature and the second signature failing to match,

generate an inconsistency report regarding at least one of the first or second versions of the database engine program code, and

perform remediation regarding at least one of the first or second versions of the database engine program code.

2. The database system of claim 1 , wherein the correctness verifier is further configured to:

receive a query key corresponding to the first execution of the query; and

access a data store that stores a set of query keys and respective signatures, each query key of the set of query keys corresponding to an execution of the query at a respective timestamp, the correctness verifier configured to access the second signature in the data store by matching the query key corresponding to the first execution of the query against the set of query keys to identify a query key corresponding to the second execution of the query.

3. The database system of claim 2 , wherein each query key of the set of query keys is a tuple of a query text hash corresponding to the execution of the query at the respective timestamp and a joined hash of versions of objects used in the execution of the query at the respective timestamp.

4. The database system of claim 1 , wherein the first signature is:

a checksum of the result of the first execution of the query; or

a count of rows of the result of the first execution of the query.

5. The database system of claim 1 , wherein to perform remediation regarding at least one of the first or second versions of the database engine program code, the correctness verifier is configured to:

transmit a failure message to a user interface;

transmit the inconsistency report to a developer interface; or

transmit a signal to a database engine to cause the database engine to capture a process image of the current state of the database engine.

6. The database system of claim 1 , wherein the first version of the database engine program code and the second version of the database engine program code are a same version of the database engine program code, the correctness verifier configured to perform an assessment of the same version of the database engine program code for an incorrect, non-deterministic issue as at least a portion of the performed remediation.

7. The database system of claim 1 , further comprising:

a database engine configured to:

receive the query;

access a timestamp of the second execution of the query in a data store;

select a version of the database with a timestamp matching the timestamp of the second execution of the query;

execute the query against the selected version of the database by the first version of the database engine program code to generate the result of the first execution of the query; and

generate the first signature based on the result of the first execution of the query.

8. A method for automatically detecting inconsistencies in a database system comprising:

receiving a first signature and a second signature, the first signature a signature of a result of a first execution of a query against a database by a first version of database engine program code, and the second signature a signature of a result of a second execution of the query by a second version of the database engine program code;

determining whether the first signature and the second signature match; and

in response to the first signature and the second signature failing to match,

generating an inconsistency report regarding at least one of the first or second versions of the database engine program code, and

performing remediation regarding at least one of the first or second versions of the database engine program code.

9. The method of claim 8 , further comprising:

receiving a query key corresponding to the first execution of the query; and

accessing a data store that stores a set of query keys and respective signatures, each query key of the set of query keys corresponding to an execution of the query at a respective timestamp, said accessing the data store including:

matching the query key corresponding to the first execution of the query against the set of query keys to identify a query key corresponding to the second execution of the query; and

obtaining the second signature based on the identified query key corresponding to the second execution of the query.

10. The method of claim 9 , wherein each query key of the set of query keys is a tuple of a query text hash corresponding to the execution of the query at the respective timestamp and a joined hash of versions of objects used in the execution of the query at the respective timestamp.

11. The method of claim 8 , wherein the first signature is:

a checksum of the result of the first execution of the query; or

a count of rows of the result of the first execution of the query.

12. The method of claim 8 , wherein said performing remediation regarding at least one of the first or second versions of the database engine program code includes:

transmitting a failure message to a user interface;

transmitting the inconsistency report to a developer interface; or

transmitting a signal to a database engine to cause the database engine to capture a process image of the current state of the database engine.

13. The method of claim 8 , further comprising:

generating the first signature as a checksum of the result of the first execution of the query using a per-row hash function.

14. The method of claim 8 , wherein the first version of the database engine program code and the second version of the database engine program code are a same version of the database engine program code, said performing remediation regarding at least one of the first or second versions of the database engine program code including:

performing an assessment of the same version of the database engine program code for an incorrect, non-deterministic issue.

15. The method of claim 8 , further comprising:

receiving the query;

accessing a timestamp of the second execution of the query in a data store;

selecting a version of the database with a timestamp matching the timestamp of the second execution of the query;

executing the query against the selected version of the database by the first version of the database engine program code to generate the result of the first execution of the query; and

generating the first signature based on the result of the first execution of the query.

16. A correctness verifier comprising:

a processor; and

at least one memory device that stores correctness verifier program code to be executed by the processor to:

receive a first signature and a second signature, the first signature a signature of a result of a first execution of a query against a database by a first version of database engine program code, and the second signature a signature of a result of a second execution of the query by a second version of the database engine program code;

determine whether the first signature and the second signature match; and

in response to the first signature and the second signature failing to match,

generate an inconsistency report regarding at least one of the first or second versions of the database engine program code, and

perform remediation regarding at least one of the first or second versions of the database engine program code.

17. The correctness verifier of claim 16 , further configured to:

receive a query key corresponding to the first execution of the query; and

access a data store that stores a set of query keys and respective signatures, each query key of the set of query keys corresponding to an execution of the query at a respective timestamp, the correctness verifier configured to access the second signature in the data store by matching the query key corresponding to the first execution of the query against the set of query keys to identify a query key corresponding to the second execution of the query.

18. The correctness verifier of claim 17 , wherein each query key of the set of query keys is a tuple of a query text hash corresponding to the execution of the query at the respective timestamp and a joined hash of versions of objects used in the execution of the query at the respective timestamp.

19. The correctness verifier of claim 16 , wherein the first signature is:

a checksum of the result of the first execution of the query; or

a count of rows of the result of the first execution of the query.

20. The correctness verifier of claim 16 , wherein to perform remediation regarding at least one of the first or second versions of the database engine program code, the correctness verifier is configured to:

transmit a failure message to a user interface;

transmit the inconsistency report to a developer interface; or

transmit a signal to a database engine to cause the database engine to capture a process image of the current state of the database engine.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 19, 2024
From: FUTUREWEI TECHNOLOGIES, INC.
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 068034/0220 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 27, 2022
From: DEMARNE, MATHIEU BAPTISTE; JOHNSON, TIMOTHY UNDERWOOD; CILIMDZIC, MISO
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 059753/0154 →
Continuity (1)
Related Publication 20230350783A1 · Nov 2, 2023
Cited By (1)
US 12,468,621