Database Synchronization State Initialization via Table Locking
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Database systems face challenges in maintaining synchronized states between primary and secondary systems during load balancing operations, leading to potential inconsistencies and increased downtime due to divergent data states between primary and secondary database systems.
Innovation Solution
The mechanism involves receiving table state information from the primary database system, parsing metadata to identify table states, creating locks for open operations, and sequentially replaying log transactions to ensure the secondary database system is initialized and maintained in a consistent state, allowing for efficient load balancing and high availability without disrupting the hot-standby functionality.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If the secondary database system is used for load balancing operations, then system availability and performance are improved, but data consistency between primary and secondary systems deteriorates leading to potential inconsistencies
Solution Approach 1:
The patent applies preliminary action by capturing table state information (including open operations and savepoint events) from the primary database system before initializing the secondary system. This pre-captured state information is stored and used during initialization to ensure the secondary system starts from a known consistent state, preventing data inconsistencies while enabling load balancing operations
2Reliability
If the secondary database system is initialized using traditional log replay methods, then data consistency is improved, but initialization time increases leading to increased downtime
Solution Approach 1:
The patent captures and stores table state information including savepoint events and open operations in advance during primary system operation. When initializing the secondary system, this pre-captured state information is reused, eliminating the need to replay entire transaction logs from scratch and significantly reducing initialization time while maintaining data consistency
Solution Approach 2:
The patent extracts and separates table state information (open operations, savepoint events) from the complete transaction log. By extracting only the relevant state information needed for initialization, the system avoids processing unnecessary log data, thereby reducing initialization time while ensuring consistency through the extracted state snapshot
3Reliability
If table state information is captured and locks are created for open operations, then data consistency is improved, but system complexity increases due to additional metadata parsing and lock management
Solution Approach 1:
The patent implements self-service by having the primary database system automatically capture and record table state information (open operations, savepoint events) as part of its normal operation. This state information is automatically stored in metadata without requiring external intervention, reducing the complexity burden on the initialization process while ensuring data consistency through automated state tracking
Data Source
AI summary
A computer implemented method for initializing a secondary database system includes receiving table state information from a primary database system at a secondary database system. The table state information includes information identifying which tables had an open operation during a savepoint event. Metadata associated with the tables is parsed to identify table state information from the metadata and a lock is created for each table identified as having an open operation during the savepoint event. Afterwards, log transaction information is sequentially parsed. Related apparatus, systems, techniques and articles are also described.


