# US 11,544,246 B2 · Partition level operation with concurrent activities

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

- Number: US 11,544,246 B2
- Document ID: US11544246B2
- Status: Granted
- Kind: B2
- Application number: 17/030,332
- Filed: 2020-09-23
- Published: 2021-03-18
- Granted: 2023-01-03
- Earliest claimed: 2014-03-14
- Assignees: Sybase, Inc.
- Applicants: Sybase, Inc.
- Inventors: Amit Pathak; Paresh Rathod; Swati Sharma; Nikhil Jamadagni
- Web page: https://patentgrep.com/patent/US11544246B2

## CPC

- G06F 16/2343: {Locking methods, e.g. distributed locking or locking implementation details}
- G06F 16/1774: {Locking methods, e.g. locking methods for file systems allowing shared and concurrent access to files}
- G06F 16/2282: {Tablespace storage structures; Management thereof}
- G06F 16/2365: {Ensuring data consistency and integrity}
- G06F 16/2379: {Updates performed during online database operations; commit processing}
- G06F 16/278: {Data partitioning, e.g. horizontal or vertical partitioning}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques of implementing partition level operations with concurrent activities are disclosed. A first operation can be performed on a first partition of a table of data. The first partition can be one of a plurality of partitions of the table, where each partition has a plurality of rows. A first partition level lock can be applied to the first partition for a period in which the first operation is being performed on the first partition, thereby preventing any operation other than the first operation from being performed on the first partition during the period the first partition level lock is being applied to the first partition. A second operation can be performed on a second partition of the table at a point in time during which the first operation is being performed on the first partition.

## Claims

### Claim 1

A system comprising:
at least one processor; and
a non-transitory computer-readable medium storing executable instructions that, when executed, cause the at least one processor to perform system operations comprising:
performing a first operation on a row of a plurality of rows in a first partition of a table of data, the first partition being one of a plurality of partitions of the table, each partition in the plurality of partitions having a plurality of rows;
applying a row level lock to the row of the plurality of rows in the first partition of the table of data;
based on the applying the row level lock to the row in the first partition, determining that a predefined threshold number of row level locks corresponding to concurrent operations have been applied within the first partition, the concurrent operations including the first operation;
based on the determining that the predefined threshold number of row level locks have been applied within the first partition, applying a first partition level lock to the first partition for a period in which the first operation is being performed on the first partition, the first partition level lock preventing any additional operations other than the concurrent operations for which the row level locks have been applied within the first partition from being performed on the first partition during the period the first partition level lock is being applied to the first partition; and
performing a second operation on a second partition of the table at a point in time during which the first operation is being performed on the first partition, the second partition being one of the plurality of partitions of the table.

### Claim 2 (depends on 1)

The system of claim 1, wherein the first operation and the second operation each comprise a data manipulation language (DML) operation.

### Claim 3 (depends on 1)

The system of claim 1, wherein the first operation and the second operation each comprise one of an insert operation, a select operation, an update operation, a delete operation, a split operation, a merge operation, a move operation, a truncate operation, or a drop operation.

### Claim 4 (depends on 1)

The system of claim 1, wherein the first operation and the second operation are performed within an enterprise application platform.

### Claim 5 (depends on 1)

The system of claim 1, wherein the system operations further comprise:
performing a first update of a schema of the table based on the performance of the first operation on the first partition;
applying a schema level lock to the schema of the table for a period covering the performance of the first update of the schema, the schema level lock preventing any update other than the first update from being performed on the schema during the performance of the first update on the schema; and
delaying a performance of a second update of the schema until after a completion of the first update based on the applying of the schema level lock to the schema, the second update being based on the performance of the second operation on the second partition.

### Claim 6 (depends on 1)

The system of claim 1, wherein the system operations further comprise:
storing a corresponding set of partition level statistics for each one of the partitions in the plurality of partitions, each set of partition level statistics comprising statistics specific to the partition to which the set corresponds;
storing a set of table level statistics for the table;
updating the corresponding set of partition level statistics for the first partition based on the performance of the first operation on the first partition;
merging the corresponding set of partition level statistics for the first partition with the set of table level statistics;
updating the corresponding set of partition level statistics for the second partition based on the performance of the second operation on the second partition; and
merging the corresponding set of partition level statistics for the second partition with the set of table level statistics.

### Claim 7 (depends on 1)

The system of claim 1, wherein the system operations further comprise:
generating a first clone of original metadata of the table based on the performance of the first operation on the first partition;
generating a second clone of the original metadata of the table based on the performance of the second operation on the second partition;
generating new metadata of the table based on a merge of the first clone and the second clone; and
discarding the original metadata.

### Claim 8

A computer-implemented method performed by a computer system having a memory and at least one hardware processor, the computer-implemented method comprising:
performing a first operation on a row of a plurality of rows in a first partition of a table of data, the first partition being one of a plurality of partitions of the table, each partition in the plurality of partitions having a plurality of rows;
applying a row level lock to the row of the plurality of rows in the first partition of the table of data;
based on the applying the row level lock to the row in the first partition, determining that a predefined threshold number of row level locks corresponding to concurrent operations have been applied within the first partition, the concurrent operations including the first operation;
based on the determining that the predefined threshold number of row level locks have been applied within the first partition, applying a first partition level lock to the first partition for a period in which the first operation is being performed on the first partition, the first partition level lock preventing any additional operations other than the concurrent operations for which the row level locks have been applied within the first partition from being performed on the first partition during the period the first partition level lock is being applied to the first partition; and
performing a second operation on a second partition of the table at a point in time during which the first operation is being performed on the first partition, the second partition being one of the plurality of partitions of the table.

### Claim 9 (depends on 8)

The computer-implemented method of claim 8, wherein the first operation and the second operation each comprise a data manipulation language (DML) operation.

### Claim 10 (depends on 8)

The computer-implemented method of claim 8, wherein the first operation and the second operation each comprise one of an insert operation, a select operation, an update operation, a delete operation, a split operation, a merge operation, a move operation, a truncate operation, or a drop operation.

### Claim 11 (depends on 8)

The computer-implemented method of claim 8, wherein the first operation and the second operation are performed within an enterprise application platform.

### Claim 12 (depends on 8)

The computer-implemented method of claim 8, further comprising:
performing a first update of a schema of the table based on the performance of the first operation on the first partition;
applying a schema level lock to the schema of the table for a period covering the performance of the first update of the schema, the schema level lock preventing any update other than the first update from being performed on the schema during the performance of the first update on the schema; and
delaying a performance of a second update of the schema until after a completion of the first update based on the applying of the schema level lock to the schema, the second update being based on the performance of the second operation on the second partition.

### Claim 13 (depends on 8)

The computer-implemented method of claim 8, further comprising:
storing a corresponding set of partition level statistics for each one of the partitions in the plurality of partitions, each set of partition level statistics comprising statistics specific to the partition to which the set corresponds;
storing a set of table level statistics for the table;
updating the corresponding set of partition level statistics for the first partition based on the performance of the first operation on the first partition;
merging the corresponding set of partition level statistics for the first partition with the set of table level statistics;
updating the corresponding set of partition level statistics for the second partition based on the performance of the second operation on the second partition; and
merging the corresponding set of partition level statistics for the second partition with the set of table level statistics.

### Claim 14 (depends on 8)

The computer-implemented method of claim 8, further comprising:
generating a first clone of original metadata of the table based on the performance of the first operation on the first partition;
generating a second clone of the original metadata of the table based on the performance of the second operation on the second partition;
generating new metadata of the table based on a merge of the first clone and the second clone; and
discarding the original metadata.

### Claim 15

A non-transitory machine-readable storage medium, tangibly embodying a set of instructions that, when executed by at least one processor, causes the at least one processor to perform system operations comprising:
performing a first operation on a row of a plurality of rows in a first partition of a table of data, the first partition being one of a plurality of partitions of the table, each partition in the plurality of partitions having a plurality of rows;
applying a row level lock to the row of the plurality of rows in the first partition of the table of data;
based on the applying the row level lock to the row in the first partition, determining that a predefined threshold number of row level locks corresponding to concurrent operations have been applied within the first partition, the concurrent operations including the first operation;
based on the determining that the predefined threshold number of row level locks have been applied within the first partition, applying a first partition level lock to the first partition for a period in which the first operation is being performed on the first partition, the first partition level lock preventing any additional operations other than the concurrent operations for which the row level locks have been applied within the first partition from being performed on the first partition during the period the first partition level lock is being applied to the first partition; and
performing a second operation on a second partition of the table at a point in time during which the first operation is being performed on the first partition, the second partition being one of the plurality of partitions of the table.

### Claim 16 (depends on 15)

The non-transitory machine-readable storage medium of claim 15, wherein the first operation and the second operation each comprise a data manipulation language (DML) operation.

### Claim 17 (depends on 15)

The non-transitory machine-readable storage medium of claim 15, wherein the first operation and the second operation each comprise one of an insert operation, a select operation, an update operation, a delete operation, a split operation, a merge operation, a move operation, a truncate operation, or a drop operation.

### Claim 18 (depends on 15)

The non-transitory machine-readable storage medium of claim 15, wherein the first operation and the second operation are performed within an enterprise application platform.

### Claim 19 (depends on 15)

The non-transitory machine-readable storage medium of claim 15, wherein the system operations further comprise:
performing a first update of a schema of the table based on the performance of the first operation on the first partition;
applying a schema level lock to the schema of the table for a period covering the performance of the first update of the schema, the schema level lock preventing any update other than the first update from being performed on the schema during the performance of the first update on the schema; and
delaying a performance of a second update of the schema until after a completion of the first update based on the applying of the schema level lock to the schema, the second update being based on the performance of the second operation on the second partition.

### Claim 20 (depends on 15)

The non-transitory machine-readable storage medium of claim 15, wherein the system operations further comprise:
storing a corresponding set of partition level statistics for each one of the partitions in the plurality of partitions, each set of partition level statistics comprising statistics specific to the partition to which the set corresponds;
storing a set of table level statistics for the table;
updating the corresponding set of partition level statistics for the first partition based on the performance of the first operation on the first partition;
merging the corresponding set of partition level statistics for the first partition with the set of table level statistics;
updating the corresponding set of partition level statistics for the second partition based on the performance of the second operation on the second partition; and
merging the corresponding set of partition level statistics for the second partition with the set of table level statistics.
