Distributed Transaction Writer Lock Management

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In distributed transaction processing, existing systems face challenges in avoiding collision problems and ensuring transaction isolation and consistency, particularly in multi-transaction concurrency scenarios.

Innovation Solution

A method and device for processing distributed transactions that involve acquiring and managing writer locks on target tables, distributing lock requests across multiple nodes, and handling non-responsive nodes by restarting or migrating services, ensuring successful locking and maintaining locking state information to prevent collisions and ensure consistency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If writer lock adding processing is performed on the target table to ensure transaction isolation, then transaction consistency is improved, but system collision problems occur in multi-transaction concurrency

Engineering Contradiction:
Improvetransaction consistencyVSAvoidsystem collision
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments the target table into multiple partitions and distributes writer locks across different partitions. Each partition can be locked independently, allowing concurrent transactions to access different partitions simultaneously. This segmentation reduces system-wide collisions while maintaining transaction isolation and consistency within each partition.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements fine-grained locking at the partition level rather than table-level locking. Each partition has its own lock state, enabling local quality control where only the specific partition being modified is locked. This allows other partitions to remain accessible to concurrent transactions, improving productivity while maintaining reliability.

Inventive Principle:
Principle #3Local quality

2Productivity

If writer locks are distributed across multiple nodes to improve system efficiency, then processing capability is improved, but lock management complexity increases

Engineering Contradiction:
Improveprocessing capabilityVSAvoidlock management
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent introduces a coordinator node as an intermediary that manages writer lock distribution across multiple worker nodes. The coordinator receives lock requests, determines which partitions need locking, and coordinates the locking process across nodes. This intermediary approach simplifies lock management complexity by centralizing coordination while enabling distributed processing capability.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent performs preliminary lock acquisition before transaction execution. The system pre-identifies which partitions will be modified and acquires locks on those partitions in advance. This preliminary action reduces lock management complexity during transaction execution and improves processing capability by avoiding lock contention during actual data operations.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If non-responsive child nodes are restarted to maintain system reliability, then system stability is improved, but service interruption time increases

Engineering Contradiction:
Improvesystem stabilityVSAvoidservice interruption
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent implements self-service mechanisms where child nodes automatically detect their own non-responsive state and trigger self-restart procedures. The system monitors node health and enables automatic recovery without manual intervention. This self-service approach improves system stability while minimizing service interruption time by initiating recovery actions immediately when failures are detected.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent implements health monitoring and early warning mechanisms that detect node degradation before complete failure. The system prepares recovery strategies in advance and can perform graceful degradation or load redistribution before a node completely fails. This beforehand cushioning reduces service interruption time by preventing catastrophic failures and enabling proactive recovery.

Inventive Principle:
Principle #11Beforehand cushioning (Prior cushioning)

4Measurement precision

If version information is sent to SQL compiler after successful locking, then transaction accuracy is improved, but communication overhead increases

Engineering Contradiction:
Improvetransaction accuracyVSAvoidcommunication overhead
Core Design Contradiction:
Measurement precisionVSLoss of energy

Solution Approach 1:

The patent merges version information transmission with the lock acquisition process. Instead of separate communication steps, the system combines lock request and version information delivery into a single communication exchange. This merging reduces communication overhead while maintaining transaction accuracy by ensuring the SQL compiler receives both the lock confirmation and version data in one interaction.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent implements feedback mechanisms where the SQL compiler sends version information requests only when needed for specific transactions. The system provides selective feedback about version information based on actual transaction requirements rather than universally transmitting all version data. This feedback approach reduces communication overhead while maintaining transaction accuracy by delivering precise version information only when necessary.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS11023446B2Method and device for processing distributed transaction
Publication Date: 2021.06.01 TRANSWARP TECHNOLOGY (SHANGHAI) CO LTD
  • US11023446B2 patent drawing
  • US11023446B2 patent drawing
  • US11023446B2 patent drawing

AI summary

An objective of the present application is to provide a method and device for processing a distributed transaction. Compared with the prior art, in a distributed system, a first device in the present application is a group formed by multiple nodes. The first device acquires a writer lock adding request, sent by an SQL compiler, about a target table of a to-be-processed transaction, and performs writer lock adding processing on the target table on the basis of the writer lock adding request, so as to avoid collision problems in multi-transaction concurrence and to ensure isolation of transactions. If the writer lock adding processing is successful, to-be-processed version information of the target table is sent to the SQL compiler, so as to ensure that the SQL compiler operates a correct version of the target table later. Further, by restarting child nodes which do not respond to the writer lock adding request or migrating service of the child nodes to other physical machines and then updating locking state information of the child nodes, the present application effectively recovers errors and ensures in-group consistency.