Database Transaction Rollback via Table Truncation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing database management systems face resource-intensive rollback processes, particularly during mass insert transactions, which can lead to Transaction Log Full situations and prolonged processing times, necessitating inefficient workarounds like splitting transactions.

Innovation Solution

The method involves truncating database tables or indexes without using logged changes, thereby avoiding the need for update log records and compensation log records, allowing for efficient rollback operations without accessing log records, and optimizing active log space allocation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If rollback is performed using logged changes, then database consistency is maintained, but processing resources are excessively consumed and Transaction Log Full situations occur

Engineering Contradiction:
Improvedatabase consistencyVSAvoidprocessing resources
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent extracts the rollback operation from the log-based processing path and creates a separate fast path using truncate. Instead of using logged changes for rollback, the system directly truncates the table or drops the index, bypassing the log record processing entirely. This separation allows rollback to occur without consuming logging resources while maintaining database consistency through the atomic nature of truncate/drop operations.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent segments the rollback mechanism into two distinct paths: the traditional log-based rollback path and a new fast path using truncate/drop operations. This segmentation allows the system to choose the appropriate path based on the operation type (table insert vs. other operations), enabling resource-efficient rollback for mass insert transactions while preserving the reliability of log-based rollback for other scenarios.

Inventive Principle:
Principle #1Segmentation

2Reliability

If rollback uses log records, then transaction integrity is ensured, but processing time is prolonged

Engineering Contradiction:
Improvetransaction integrityVSAvoidprocessing time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent extracts the time-consuming log record processing step from the rollback operation for mass insert transactions. By using truncate/drop operations that bypass log record processing, the system achieves rollback in constant time regardless of the number of inserted records, while transaction integrity is maintained through the atomic characteristics of these operations.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent performs preliminary action by marking tables with a flag indicating they are candidates for fast rollback. This allows the system to prepare the table structure and metadata in advance so that when rollback is needed, the truncate operation can execute immediately without needing to process individual log records, significantly reducing processing time.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If mass insert transactions are rolled back using traditional methods, then all changes are undone, but Transaction Log Full situations occur and system performance degrades

Engineering Contradiction:
Improvetransaction rollback completenessVSAvoidsystem performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent extracts mass insert table rollbacks from the traditional log-based processing path and routes them through a dedicated fast path using truncate operations. This extraction prevents Transaction Log Full situations by eliminating the need to write and process numerous log records for rollback, while truncate operations ensure complete rollback of all inserted records, maintaining reliability without compromising system performance.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS12093139B2Rolling back a database transaction
Publication Date: 2024.09.17 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US12093139B2 patent drawing
  • US12093139B2 patent drawing
  • US12093139B2 patent drawing

AI summary

A system and method for a database management system. The method comprises: receiving a database transaction for inserting a set of records in a database table of the database management system or for creating indexes. The database transaction may be executed using the database management system. The database management system may rollback the database transaction by truncating the database table or the created indexes.