Batch Undo Processing for Multi-Writer Database Rollbacks

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In distributed computing systems, managing transactions across multiple writers in a database can lead to complexity and performance issues during rollback operations due to conflicts and the need for consistent state management, particularly in scenarios where transactions fail or are aborted, resulting in inefficient undo log processing.

Innovation Solution

Implementing batch undo processing techniques that group undo log records for simultaneous application, reducing conflict resolution overhead and improving performance by applying undo records in batches rather than individually, thus minimizing resource utilization and storage overhead.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If individual undo log records are processed sequentially during transaction rollback, then conflict resolution can be performed accurately, but rollback time and resource utilization increase significantly

Engineering Contradiction:
Improveconflict resolution accuracyVSAvoidrollback time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

Multiple individual undo log record processing operations are merged into a single batch processing operation. The system groups multiple undo records into batches and processes them together in a single transaction, reducing the total number of conflict resolution operations needed while maintaining accuracy through batch-level conflict detection and resolution.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The system performs preliminary actions by pre-grouping undo log records into batches before processing. Undo records are organized into batches based on their transaction IDs and sequence numbers, preparing them for efficient batch processing that reduces subsequent conflict resolution overhead.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If multiple writers are allowed in the distributed database system, then system scalability and service capacity improve, but complexity of managing concurrent writes and transaction consistency increases

Engineering Contradiction:
Improveservice capacityVSAvoidsystem complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system segments the database into multiple partitions that can be independently managed by different writers. Each partition can be owned by a specific writer node, allowing concurrent writes to different partitions without requiring complex global coordination, thus reducing system complexity while maintaining multi-writer capability.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system introduces an intermediary coordination mechanism that manages conflicts between multiple writers. When write conflicts are detected, the intermediary resolves them by selecting winning writes and notifying affected writers, enabling multiple writers to operate concurrently while maintaining consistency without each writer needing direct communication with every other writer.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Productivity

If undo log records are processed in batches concurrently, then rollback performance improves, but risk of conflicts between batch operations and other writers increases

Engineering Contradiction:
Improverollback performanceVSAvoidconflict frequency
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system implements feedback mechanisms where the results of batch undo processing are monitored and used to adjust subsequent processing. When conflicts are detected during batch processing, the system receives feedback about the conflict and responds by retrying the affected batches or adjusting the processing strategy, allowing concurrent batch processing while managing conflict risk through adaptive response.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS11366802B1Batch undo processing for transaction rollbacks in a multi-writer database
Publication Date: 2022.06.21 AMAZON TECH INC
  • US11366802B1 patent drawing
  • US11366802B1 patent drawing
  • US11366802B1 patent drawing

AI summary

Batch processing of undo log records may be performed for rolling back a database transaction. When a rollback operation for a database transaction is performed, undo log records from an undo log to rollback the database transaction are divided into different groups of undo log records. Different requests for the different undo log records are sent to a storage system to be performed. If a conflict is detected for an undo log record in a group, an indication of the conflicting undo log record may be provided to indicate the conflict. The group of undo log records may be resent with a request to reapply the undo log records in the group. When all groups have been identified as successfully completed, then the rollback operation may be considered completed.