UTC-Based Step ID Structure for Database Recovery
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional database step IDs are affected by daylight saving time changes, leading to duplicate IDs, and the continued use of existing step IDs can cause data corruption during recovery, especially when the advance portion wraps around or when rollbacks are not properly handled.
Innovation Solution
Implementing a new step ID structure using coordinated universal time (UTC) for the timestamp portion and a rollback count to ensure unique IDs and accurate recovery, avoiding duplicate IDs and data corruption by using a 72-bit value with 63 bits for UTC and 9 bits for uniqueness, and storing rollback counts in periodic save records.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If a time-based step ID structure using local time is used, then the step ID can reflect the current time, but duplicate step IDs are generated during daylight saving time adjustments
Solution Approach 1:
The patent changes the time reference parameter from local time (which changes with daylight saving time) to UTC (coordinated universal time), which does not change with seasonal offsets. This parameter change ensures that step IDs remain unique even when local clocks are adjusted backwards during fall back transitions.
2Productivity
If the advance portion of the step ID is incremented beyond maximum value, then the step ID can continue to be used for new transactions, but the advance portion wraps around and causes duplicate identifiers
Solution Approach 1:
The patent adds a new dimension to the step ID structure by incorporating a 64-bit timestamp portion (providing 2^64 possible values) combined with the 9-bit advance portion. This dimensional expansion ensures that even when the advance portion wraps around, the full step ID remains unique due to the vast number of possible timestamp values.
3Reliability
If the database is shut down for one hour during daylight saving time adjustment, then duplicate step IDs are avoided, but database availability and performance are reduced
Solution Approach 1:
The patent changes the time reference parameter from local time to UTC, allowing the database to continue operating without shutdown during daylight saving time adjustments. This parameter change eliminates the need to stop the database while maintaining step ID uniqueness.
4Ease of operation
If rollback operations are performed without tracking the number of rollbacks, then the operation is simple, but data corruption occurs during recovery when updates are incorrectly reapplied
Solution Approach 1:
The patent introduces a rollback count that provides feedback about the state of each step ID. This feedback mechanism tracks how many times a step has been rolled back, allowing the recovery process to correctly determine which updates should be reapplied and preventing data corruption from incorrect update application.
5Reliability
If a 72-bit step ID structure with 63 bits for UTC and 9 bits for uniqueness is used, then duplicate step IDs are eliminated, but the complexity of the step ID structure increases
Solution Approach 1:
The patent segments the step ID into distinct functional portions: a 64-bit timestamp portion (using 63 bits for UTC time and 1 bit for sign/indication), a 9-bit advance portion, and associated metadata like rollback counts. This segmentation organizes the complexity into manageable, well-defined components with clear responsibilities.
Data Source
AI summary
One or more transactions, and their audited update actions, operating on a database may be identified by a step ID. The step ID may include a first set of bits identifying a time the step was created. The step ID may also include a second set of bits uniquely identifying a step created at a certain time from other step created at the same time. The first set of bits may be generated from a coordinated universal time (UTC) that does not change with local seasons, such as daylight saving time.


