Recoverable Commit Identifier for Distributed Database Recovery

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing database recovery protocols fail to efficiently manage commit identifiers for in-doubt transactions in distributed database systems, leading to inaccurate results or data corruption during recovery, especially when transactions are not fully committed prior to interruption.

Innovation Solution

Implementing an in-memory reference at the master node to correlate transaction identifiers with commit identifiers, allowing the master node to assign and store these identifiers, and ensuring their atomic persistence, enabling rapid access and accurate recovery even if the database system is interrupted before the commit log is fully written.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If distributed database system recovers using traditional sequential replay methods, then system recovery can proceed without commit identifiers, but in-doubt transactions cannot be properly identified and data corruption may occur

Engineering Contradiction:
Improverecovery accuracyVSAvoidcommit identifier management
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system pre-assigns commit identifiers to transactions at the master node before the slave node completes the commit operation. This preliminary assignment ensures that even if the slave node fails before writing the commit log, the commit identifier exists and can be used during recovery to determine the transaction's committed state, thereby improving recovery accuracy without requiring complex post-failure analysis

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

An in-memory reference structure is introduced as an intermediary between the master node's commit log and the slave node's transaction state. This reference stores the mapping between transaction identifiers and commit identifiers, allowing the slave node to quickly determine whether in-doubt transactions were committed without complex log analysis, thus improving reliability while managing complexity through a dedicated intermediary component

Inventive Principle:
Principle #24Intermediary (Mediator)

2Speed

If the master node maintains an in-memory reference for all transaction commits, then commit identifier access is rapid, but memory usage increases

Engineering Contradiction:
Improvecommit identifier access speedVSAvoidmemory consumption
Core Design Contradiction:
SpeedVSQuantity of substance

Solution Approach 1:

The in-memory reference structure stores only the critical mapping information (transaction identifier to commit identifier) needed for rapid recovery determination, rather than maintaining complete transaction state information. This selective storage provides fast access to commit identifiers while limiting memory consumption to only the essential data required for the specific function of commit status verification

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The system extracts only the necessary commit identifier mapping from the complete transaction log data and stores it in-memory. By separating this critical subset of information from the full transaction history, the system achieves rapid access speed for commit identifier lookup while keeping memory usage proportional to the number of active transactions rather than the total transaction history

Inventive Principle:
Principle #2Taking out (Extraction)

3Reliability

If the slave node waits for commit log to be fully written before considering transaction committed, then data consistency is maintained, but recovery time increases when interruption occurs

Engineering Contradiction:
Improvedata consistencyVSAvoidrecovery time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The commit identifier is assigned to the transaction at the master node in advance, before the slave node completes writing the commit log. This preliminary assignment allows the slave node to have a head start on the commit process without compromising consistency, because the authoritative commit identifier already exists and can be used to verify commit status during recovery, thereby reducing recovery time while maintaining data consistency

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The slave node continuously monitors the commit log for its assigned commit identifier as feedback that the transaction has been committed. This feedback mechanism allows the slave node to determine commit status efficiently without waiting for the entire log to be written, reducing recovery time while maintaining consistency through verification of the authoritative commit identifier from the master node

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS11874746B2Transaction commit protocol with recoverable commit identifier
Publication Date: 2024.01.16 SAP SE
  • US11874746B2 patent drawing
  • US11874746B2 patent drawing
  • US11874746B2 patent drawing

AI summary

Technologies are described for facilitating database system recovery in a distributed database environment having a master node and at least one slave node. The master node maintains an in-memory reference that includes transaction identifiers and their corresponding commit identifiers. When a slave node requests that a commit identifier be assigned to a transaction, the transaction and commit identifiers for the transaction are added to the in-memory reference. The commit identifier is sent by the master node to the slave node. The slave node writes a log entry to a commit log that includes the transaction identifier and the assigned commit identifier. If the database system is interrupted before the slave node writes the commit log entry, the slave node can request the commit identifier for the transaction from the master node, which retrieves the identifier from the in-memory reference.