# US 2019/0317666 A1 · Transactional operations in multi-master distributed data management systems

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

- Number: US 2019/0317666 A1
- Document ID: US20190317666A1
- Status: Published application
- Kind: A1
- Application number: 16/455,579
- Filed: 2019-06-27
- Published: 2019-10-17
- Earliest claimed: 2018-02-28
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Ronald J. Barber; Christian Garcia-Arellano; Ronen Grosman; Matthew A. Huras; Mir Hamid Pirahesh; Vijayshankar Raman; Richard S. Sidle; Adam J. Storm; Pinar Tozun
- Web page: https://patentgrep.com/patent/US20190317666A1

## CPC

- G06F 3/064: {Management of blocks}
- G06F 16/2322: {using timestamps}
- G06F 3/0604: {Improving or facilitating administration, e.g. storage management}
- G06F 3/0673: {Single storage device}
- G06F 12/0802: Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F 16/134: {Distributed indices}
- G06F 2212/6022: Using a prefetch buffer or dedicated prefetch cache
- H04L 67/10: in which an application is distributed across nodes in the network (software deployment G06F8/60; multiprogramming arrangements G06F9/46)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

One embodiment provides for a method for grooming transactional operations in a multi-master distributed data management system including maintaining transactional operations in at least one transaction-local side-log. A table log scan is performed for a table including recording identification for each record in a log. Tuple sequence numbers are generated for the records and the records are written on groomed transaction blocks to the table.

## Claims

### Claim 1

A method for grooming transactional operations in a multi-master distributed data management system, comprising:
maintaining transactional operations in at least one transaction-local side-log;
performing a table log scan for a table including recording identification for each record in a log; and
generating tuple sequence numbers for the records and writing the records on groomed transaction blocks to the table.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
loading each column in the table with column values based on the identifications.

### Claim 3 (depends on 2)

The method of claim 2, wherein the records on groomed transaction blocks are written to the table based on the column values.

### Claim 4 (depends on 3)

The method of claim 3, wherein the table is sharded across nodes handling transactional operations in the multi-master distributed data management system to increase processing handling of the transactional operations.

### Claim 5 (depends on 4)

The method of claim 4, wherein the writing further comprises:
receiving a next input group of records from scanning the table;
generating unique commit timestamps;
appending columns of the records to an in-memory buffer; and
generating the tuple sequence numbers for the records written to the groomed transaction blocks.

### Claim 6 (depends on 5)

The method of claim 5, wherein upon a determination that there is no additional input group of records and the in-memory buffer is not full, flushing the in-memory buffer to at least one of a shared file system, an object store or a local cache.

### Claim 7 (depends on 6)

The method of claim 6, further comprising:
if a further input group of records is not available, notifying a distributed coordinator of a groom end point information;
moving a log head beyond the groom end point; and
pruning the log until no read processes remain;
wherein:
the transactional operations comprise update, delete and insert operations;
upon a successful transaction commit, the transaction-local side-log is appended to a stream of the log;
a grooming process only reads the log and avoids uncommitted transaction changes; and
a thread performing the grooming process maintains a cursor on the log as an indication of a previous grooming cycle.

### Claim 8

A computer program product for grooming transactional operations in a multi-master distributed data management system, the computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a processor to cause the processor to:
maintain, by the processor, transactional operations in at least one transaction-local side-log;
perform, by the processor, a table log scan for a table including recording identification for each record in a log; and
generate and write, by the processor, tuple sequence numbers for the records and the records on groomed transaction blocks to the table, respectively.

### Claim 9 (depends on 8)

The computer program product of claim 8, wherein the program instructions executable by the processor further to cause the processor to:
load, by the processor, each column in the table with column values based on the identifications.

### Claim 10 (depends on 9)

The computer program product of claim 9, wherein the records on groomed transaction blocks are written to the table based on the column values.

### Claim 11 (depends on 9)

The computer program product of claim 9, wherein the table is sharded across nodes handling transactional operations in the multi-master distributed data management system to increase processing handling of the transactional operations.

### Claim 12 (depends on 11)

The computer program product of claim 11, wherein the program instructions executable by the processor further to cause the processor to:
receive, by the processor, a next input group of records from scanning the table;
generate, by the processor, unique commit timestamps;
append, by the processor, columns of the records to an in-memory buffer; and
generate, by the processor, the tuple sequence numbers for the records written to the groomed transaction blocks.

### Claim 13 (depends on 12)

The computer program product of claim 12, wherein upon a determination that there is no additional input group of records and the in-memory buffer is not full, flushing the in-memory buffer to at least one of a shared file system, an object store or a local cache.

### Claim 14 (depends on 13)

The computer program product of claim 13, the write further comprises program instructions executable by the processor to cause the processor to:
if a further input group of records is not available, notify, by the processor, a distributed coordinator of a groom end point information;
move, by the processor, a log head beyond the groom end point; and
prune, by the processor, the log until no read processes remain;
wherein:
the transactional operations comprise update, delete and insert operations.
upon a successful transaction commit, the transaction-local side-log is appended to a log stream;
a grooming process only reads the log and avoids uncommitted transaction changes;
a thread performing the grooming process maintains a cursor on the log as an indication of a previous grooming cycle;
in the log stream prior to a location that the cursor points to is marked for deletion;
a pruning process deletes a portion of the log stream upon a determination that no ongoing read operation is in the portion log stream; and
both the grooming process and read operations follow the previous grooming cycle such that read operations of data are monotonic.

### Claim 15

An apparatus comprising:
a memory configured to store instructions; and
a processor configured to execute the instructions to:
maintain transactional operations in at least one transaction-local side-log;
perform a table log scan for a table including recording identification for each record in a log; and
generate tuple sequence numbers for the records and write the records on groomed transaction blocks to the table.

### Claim 16 (depends on 15)

The apparatus of claim 15, wherein the processor is further configured to execute the instructions to:
load each column in the table with column values based on the identifications, wherein writing the records on groomed transaction blocks to the table is based on the column values.

### Claim 17 (depends on 16)

The apparatus of claim 16, wherein the table is sharded across nodes handling transactional operations in a multi-master distributed data management system to increase processing handling of the transactional operations.

### Claim 18 (depends on 17)

The apparatus of claim 17, wherein the write further comprises:
receiving a next input group of records from scanning the table;
generating unique commit timestamps;
appending columns of the records to an in-memory buffer; and
generating the tuple sequence numbers for the records written to the groomed transaction blocks,
wherein upon a determination that there is no additional input group of records and the in-memory buffer is not full, flushing the in-memory buffer to at least one of a shared file system, an object store or a local cache.

### Claim 19 (depends on 18)

The apparatus of claim 18, wherein the processor configured to execute the instructions to:
if a further input group of records is not available, notifying a distributed coordinator of a groom end point information;
moving a log head beyond the groom end point; and
pruning the log until no read processes remain;
wherein:
the transactional operations comprise update, delete and insert operations;
upon a successful transaction commit, the transaction-local side-log is appended to a log stream;
a grooming process only reads the log and avoids uncommitted transaction changes;
a thread performing the grooming process maintains a cursor on the log as an indication of a previous grooming cycle;
in the log stream prior to a location that the cursor points to is marked for deletion;
a pruning process deletes a portion of the log stream upon a determination that no ongoing read operation is in the portion log stream; and
both the grooming process and read operations follow the previous grooming cycle such that read operations of data are monotonic.

### Claim 20 (depends on 19)

The apparatus of claim 19, wherein:
the grooming process only reads log streams with commit timestamps less than a start time of the grooming process such that a grooming cycle has a bounded execution time;
updated records are flagged with an end timestamp after the grooming process by a periodic background process such that the updated records are ignored by reading processes that need latest data or by reading processes that read data from a specific time period;
the multi-master distributed data management system operates on two tiers of storage comprising: a first storage tier that is local to a node, and a second storage tier including a distributed shared file system or an object store;
the first storage tier maintains a persistent version of logs to be used during recovery by the grooming process to start grooming from where the grooming process left off in a previous cycle, and caches frequently accessed portions of the second storage tier to enable fast access to data; and
the second storage tier maintains the data stream and makes the data stream available to all of nodes in the multi-master distributed data management system.
