Write Tracker Operations for Cross-Page Constraint Enforcement

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In distributed multi-writer database systems, enforcing cross-page data constraints, such as referential integrity, is challenging due to the lack of conflict detection across different pages or storage locations, leading to potential foreign key constraint violations during concurrent updates by multiple database nodes.

Innovation Solution

The implementation of write tracker operations that generate a 'blank update' or write tracker operation to ensure data stability across pages, allowing the storage layer to detect and report conflicts, ensuring that updates do not violate cross-page constraints by using a write tracking transaction that includes a collection of updates and log sequence numbers (LSN), causing all operations to succeed or fail atomically.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If multiple writers are allowed to write to the database concurrently, then productivity is improved, but reliability deteriorates due to potential constraint violations

Engineering Contradiction:
Improvewrite throughputVSAvoidconstraint enforcement
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system performs preliminary actions by generating write tracker operations that record the state of data pages before concurrent writes occur. These trackers are inserted into the write queue ahead of the actual write operations, enabling the storage layer to detect conflicts and enforce constraints before commits are finalized, thus maintaining reliability while allowing high concurrency

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

Write tracker operations serve as intermediaries between multiple writers and the storage layer. These trackers mediate conflict detection by monitoring changes to data pages and coordinating between concurrent write operations, ensuring constraint enforcement without requiring writers to directly communicate or serialize their operations

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If write tracker operations are implemented to enforce cross-page constraints, then reliability is improved, but device complexity increases

Engineering Contradiction:
Improvecross-page constraint enforcementVSAvoidstorage layer complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The write tracker operation structure is designed to be universal and multi-functional. Each tracker operates independently but follows the same standardized format with fields for page identification, LSN ranges, and conflict detection logic. This uniform structure allows the storage layer to handle cross-page constraint enforcement using the same mechanisms already in place for single-page writes, avoiding the need for complex specialized handling

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Measurement precision

If write tracker operations are used to detect conflicts, then measurement precision is improved, but loss of time increases due to additional operations

Engineering Contradiction:
Improveconflict detection accuracyVSAvoidwrite operation latency
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system implements skipping by allowing write tracker operations to be quickly processed and discarded once their conflict detection function is fulfilled. Trackers are inserted into the write queue and processed alongside normal write operations, but they are removed after serving their purpose, preventing them from accumulating and causing latency. The storage layer efficiently scans through trackers to detect conflicts without requiring comprehensive processing of each one

Inventive Principle:
Principle #21Skipping (Rushing through)

Data Source

PatentUS11379463B1Atomic enforcement of cross-page data constraints in decoupled multi-writer databases
Publication Date: 2022.07.05 AMAZON TECH INC
  • US11379463B1 patent drawing
  • US11379463B1 patent drawing
  • US11379463B1 patent drawing

AI summary

Systems and methods are disclosed to implement, in a database system, a database engine node that generates write tracking transactions to atomically enforce cross-page constraints for write operations. In embodiments, the database system may include multiple database engine nodes that optimistically perform page writes without checking for potential conflicts at a shared storage system. The storage system is configured to detect and report conflicting writes on the same page. To cause the storage system to report cross-page conflicts for a write, the database engine node creates a transaction that includes the write and a write tracker (WT) operation for a tracked page. The WT operation will cause the storage system to report any conflicting writes to the tracked page before the actual write is accepted by the storage system. If a reported conflict is not favorably resolved, the database engine node will abort the entire transaction, including the actual write.