Database Partition State Synchronization Using Compare-and-Swap

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current methods for synchronizing partition states in database systems often rely on synchronization variables like mutexes, which can cause performance degradation in processes waiting to access them.

Innovation Solution

Implement multilevel synchronization by using a mutex for non-active partitions and a compare-and-swap instruction for active partitions to manage access and state changes efficiently, ensuring concurrent access control and reducing wait times.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a mutex synchronization variable is used to synchronize partition states, then reliability of partition state synchronization is improved, but productivity of processes waiting to access the partition deteriorates

Engineering Contradiction:
Improvepartition state synchronizationVSAvoidprocess access speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent divides the synchronization mechanism into two segments: mutex for non-active partitions and compare-and-swap for active partitions. This segmentation allows different synchronization strategies to be applied based on partition state, improving overall system performance while maintaining reliability.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies different synchronization qualities to different partition states: strong mutual exclusion (mutex) for non-active partitions and lighter atomic operations (compare-and-swap) for active partitions. This local differentiation optimizes performance for the common case of accessing active partitions while maintaining reliability for state changes.

Inventive Principle:
Principle #3Local quality

2Reliability

If a mutex is used for all partition access, then reliability of state change synchronization is improved, but loss of time in waiting for access increases

Engineering Contradiction:
Improvestate change synchronizationVSAvoidwait time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent changes the synchronization parameter based on partition state. For active partitions, it uses compare-and-swap with an active flag, while for non-active partitions, it uses mutex. This parameter change reduces wait time for active partitions while maintaining synchronization reliability for state changes.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent performs preliminary action by setting the active flag before allowing compare-and-swap operations. This preliminary marking of active partitions allows processes to quickly identify and access active partitions without acquiring mutex, reducing wait time while maintaining reliability.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS9471660B2Partition lookup and state synchronization
Publication Date: 2016.10.18 SYBASE INC
  • US9471660B2 patent drawing
  • US9471660B2 patent drawing
  • US9471660B2 patent drawing

AI summary

Disclosed herein are system, method, and computer program product embodiments for multilevel synchronization of database table partition states. An embodiment operates by retrieving a partition from a partition lookup structure and determining whether the partition is in an active state. Based on a determination that the partition is in the active state an embodiment increments a counter associated with the partition using a compare-and-swap instruction accesses the partition.