Database Synchronization Batching and Sorting for Deadlock Prevention

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Database deadlocks occur during synchronization due to multiple data elements being associated with a common element, leading to inefficient and time-consuming updates.

Innovation Solution

Data elements are divided into batches and sorted before performing parallel database transactions, with each transaction sequentially locking and updating rows to prevent deadlocks.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If parallel database transactions are performed to update multiple data elements, then processing speed is improved, but deadlocks occur due to concurrent access to common data elements

Engineering Contradiction:
Improveprocessing speedVSAvoiddeadlock prevention
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent applies preliminary action by sorting data elements in a consistent order before executing parallel transactions. This pre-establishes a deterministic access sequence that prevents circular wait conditions causing deadlocks, while still allowing parallel processing to proceed efficiently

Inventive Principle:
Principle #10Preliminary action

2Reliability

If data elements are updated sequentially to prevent deadlocks, then reliability is improved, but processing time increases

Engineering Contradiction:
Improvedeadlock preventionVSAvoidprocessing time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent segments data elements into batches that are sorted and processed in parallel transactions. Each batch is independently sortable and processable, allowing concurrent execution without interference. This segmentation maintains reliability through consistent ordering while preserving parallel processing performance

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary sorting of data elements within each batch before parallel transaction execution. This pre-ordering ensures that all transactions access data in the same sequence, preventing deadlocks while allowing the actual data updates to proceed in parallel, thus reducing overall processing time compared to purely sequential updates

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12393604B2Systems and methods for preventing database deadlocks during synchronization
Publication Date: 2025.08.19 SAP SE
  • US12393604B2 patent drawing
  • US12393604B2 patent drawing
  • US12393604B2 patent drawing

AI summary

Embodiments of the present disclosure include techniques for storing and updating data in a database. In one embodiment, data elements are stored in a many to one relationship in different tables. When data updates occur, the records to be updated are divided into batches and sorted. Database transactions to update the batches are performed in parallel. When one transaction accesses a record in the database, the record is locked. Other batches accessing the locked record may wait until the record is unlocked to complete their updates. The present techniques may improve database processing by reducing or eliminating database deadlocks, for example.