# US 2023/0409430 A1 · Database metadata corruption mitigation

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2023/0409430 A1
- Document ID: US20230409430A1
- Status: Published application
- Kind: A1
- Application number: 18/104,249
- Filed: 2023-01-31
- Published: 2023-12-21
- Earliest claimed: 2022-05-31
- Assignees: Snowflake Inc.
- Applicants: Snowflake Inc.
- Inventors: Selcuk Aya; Leonid Baraznenok; Jaeha Lee; Adrian Peter Neumann; Ryan Michael Thomas Shelly; Zerui Wei; Jiaqi Yan
- Web page: https://patentgrep.com/patent/US20230409430A1

## CPC

- G06F 11/1435: {using file system or storage system metadata}
- G06F 16/2365: {Ensuring data consistency and integrity}
- G06F 11/0751: {Error or fault detection not based on redundancy (power supply failures G06F1/30; network fault management H04L41/06)}
- G06F 11/079: {Root cause analysis, i.e. error or fault diagnosis (in a hardware test environment G06F11/22; in a software test environment G06F11/36)}
- G06F 11/0793: {Remedial or corrective actions (recovery from an exception in an instruction pipeline G06F9/3861; by retry G06F11/1402; for recovering from a failure of a protocol instance or entity H04L69/40)}
- G06F 16/215: Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
- G06F 2201/80: Database-specific techniques
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Embodiments of the present disclosure may provide a data protection system that performs identification of errors from queries on a database. The data protection system can further identify corrupted data from additional errors, are difficult to detect, and occur between layers of data in the database system. The data protection system can perform corrections of the error data by rebuilding database data or removing the corrupted data.

## Claims

### Claim 1

(canceled)

### Claim 2

A method comprising:
processing, by at least one processor of a database system, one or more queries for the database system, the database system comprising database data and one or more metadata data store layers;
identifying, by one or more data integrity systems, corrupted data in the one or more metadata data store layers of the database system caused by the one or more queries being processed on the database data, the identifying of the corrupted data comprising checking for mismatched metadata values in the one or more metadata data store layers;
identifying, by the one or more data integrity systems, one or more files related to the corrupted data in the one or more metadata data store layers; and
correcting, by one or more data correction systems, the corrupted data in the one or more metadata data store layers by incrementally rebuilding the one or more files and metadata related to the one or more files based on log data of the one or more files.

### Claim 3 (depends on 2)

The method of claim 2, wherein correcting the corrupted data further comprises replacing mismatched data with corrected data in the metadata.

### Claim 4 (depends on 2)

The method of claim 2, wherein correcting the corrupted data further comprises deleting the corrupted data.

### Claim 5 (depends on 2)

The method of claim 2, wherein the corrupted data comprise one or more data payload errors comprising a mismatch between database data and one or more of the metadata values.

### Claim 6 (depends on 2)

The method of claim 2, wherein identifying the corrupted data further comprises performing online error checking, the performing online error checking comprising checking for database errors while the queries are processed on the database data.

### Claim 7 (depends on 2)

The method of claim 2, wherein the corrupted data occur in the database system in processing the queries on the database data.

### Claim 8 (depends on 2)

The method of claim 2, wherein the corrupted data occur in one or more of a plurality of nodes in processing the queries on the database data.

### Claim 9 (depends on 8)

The method of claim 8, wherein the metadata data store layers are distributed across the plurality of nodes.

### Claim 10 (depends on 2)

The method of claim 2, wherein correcting the corrupted data further comprises using a background service of the database system.

### Claim 11 (depends on 2)

The method of claim 2, wherein the metadata are in a hierarchy, and identifying the corrupted data further comprises checking for mismatches in an increasing sequence from a lower level in the hierarchy to a higher level in the hierarchy, a highest level in the hierarchy being a database data level that comprises the database data that is processed according to the queries.

### Claim 12

A system comprising:
one or more processors of a machine; and
at least one memory storing instructions that, when executed by the one or more processors, cause the machine to perform operations comprising:
processing one or more queries for a database system, the database system comprising database data and one or more metadata data store layers;
identifying, by one or more data integrity systems, corrupted data in the one or more metadata data store layers of the database system caused by the one or more queries being processed on the database data, the identifying of the corrupted data comprising checking for mismatched metadata values in the one or more metadata data store layers;
identifying, by the one or more data integrity systems, one or more files related to the corrupted data in the one or more metadata data store layers; and
correcting, by one or more data correction systems, the corrupted data in the one or more metadata data store layers by incrementally rebuilding the one or more files and metadata related to the one or more files based on log data of the one or more files.

### Claim 13 (depends on 12)

The system of claim 12, wherein correcting the corrupted data further comprises replacing mismatched data with corrected data in the metadata.

### Claim 14 (depends on 12)

The system of claim 12, wherein correcting the corrupted data further comprises deleting the corrupted data.

### Claim 15 (depends on 12)

The system of claim 12, wherein the corrupted data comprise one or more data payload errors comprising a mismatch between database data and one or more of the metadata values.

### Claim 16 (depends on 12)

The system of claim 12, wherein identifying the corrupted data further comprises using online error checking that checks for database errors while the queries are processed on the database data.

### Claim 17 (depends on 12)

The system of claim 12, wherein the corrupted data occur in the database system in processing the queries on the database data.

### Claim 18 (depends on 12)

The system of claim 12, wherein the corrupted data occur in one or more of a plurality of nodes processing the one or more queries on the database data.

### Claim 19 (depends on 18)

The system of claim 18, wherein the metadata data store layers are distributed across the plurality of nodes.

### Claim 20 (depends on 12)

The system of claim 12, wherein correcting the corrupted data further comprises using a background service of the database system.

### Claim 21 (depends on 12)

The system of claim 12, wherein the metadata are in a hierarchy, and identifying the corrupted data further comprises checking for mismatches in an increasing sequence from a lower level in the hierarchy to a higher level in the hierarchy, a highest level in the hierarchy being a database data level that comprises the database data that is processed according to the queries.

### Claim 22

A machine-storage media embodying instructions that, when executed by at least on processor of a machine, cause the machine to perform operations comprising:
processing one or more queries for a database system, the database system comprising database data and one or more metadata data store layers;
identifying, by one or more data integrity systems, corrupted data in the one or more metadata data store layers of the database system caused by the one or more queries being processed on the database data, the identifying of the corrupted data comprising checking for mismatched metadata values in the one or more metadata data store layers;
identifying, by the one or more data integrity systems, one or more files related to the corrupted data in the one or more metadata data store layers; and
correcting, by one or more data correction systems, the corrupted data in the one or more metadata data store layers by incrementally rebuilding the one or more files and metadata related to the one or more files based on log data of the one or more files.

### Claim 23 (depends on 22)

The machine-storage media of claim 22, wherein correcting the corrupted data further comprises replacing mismatched data with corrected data in the metadata.

### Claim 24 (depends on 22)

The machine-storage media of claim 22, wherein correcting the corrupted data further comprises deleting the corrupted data.

### Claim 25 (depends on 22)

The machine-storage media of claim 22, wherein the corrupted data comprise one or more data payload errors comprising a mismatch between database data and one or more of the metadata values.

### Claim 26 (depends on 22)

The machine-storage media of claim 22, wherein identifying the corrupted data further comprises using online error checking that checks for database errors while the queries are processed on the database data.

### Claim 27 (depends on 22)

The machine-storage media of claim 22, wherein the corrupted data occur in the database system in processing the queries on the database data.

### Claim 28 (depends on 22)

The machine-storage media of claim 22, wherein the corrupted data occur in one or more of a plurality of nodes in processing the queries on the database data.

### Claim 29 (depends on 28)

The machine-storage media of claim 28, wherein the metadata data store layers are distributed across the plurality of nodes.

### Claim 30 (depends on 22)

The machine-storage media of claim 22, wherein correcting the corrupted data further comprises using a background service of the database system.

### Claim 31 (depends on 22)

The machine-storage media of claim 22, wherein the metadata are in a hierarchy, and identifying the corrupted data further comprises checking for mismatches in an increasing sequence from a lower level in the hierarchy to a higher level in the hierarchy, a highest level in the hierarchy being a database data level that comprises the database data that is processed according to the queries.
