Dual Granularity Locking for Data Consistency and Concurrency
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Business management systems face issues with data consistency and accuracy due to retroactive changes, leading to incorrect evaluations in processes like payroll, marketing, and sales, and potential access problems in multi-user environments, where coarse locking can slow down systems and cause inconsistencies.
Innovation Solution
Implementing a combination of coarse and fine exclusive locks, along with change pointers and data snapshots, to ensure only one evaluation is run on selected data and prevent changes during evaluations, allowing for re-evaluation of data from the earliest effective date and avoiding the use of uncommitted data.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If coarse locking is used to prevent data changes during evaluation, then data consistency is improved, but system performance deteriorates due to excessive locking scope
Solution Approach 1:
The patent divides the locking mechanism into two distinct levels: coarse-grained evaluation locks that prevent concurrent evaluations on the same data, and fine-grained data modification locks that control actual data changes. This segmentation allows each lock type to operate at its appropriate scope, preventing the need to lock entire datasets during evaluations while maintaining consistency.
Solution Approach 2:
The patent implements different locking strategies for different operations: evaluation locks are applied at the data set level for read-only evaluation operations, while modification locks are applied at the individual data record level for write operations. This local differentiation ensures that evaluation processes can proceed without blocking unrelated data modifications, improving overall system throughput.
2Reliability
If coarse locking is used to ensure data consistency, then evaluation accuracy is improved, but access flexibility deteriorates as other processes are blocked
Solution Approach 1:
The patent implements dynamic lock management where evaluation locks are acquired temporarily only for the duration of the evaluation operation, and modification locks are acquired and released based on actual data change operations. This dynamic approach allows the system to flexibly grant and revoke access permissions, enabling concurrent evaluations on different datasets and concurrent modifications on unrelated records.
Solution Approach 2:
The patent introduces an intermediary locking mechanism that mediates between evaluation processes and data modification processes. The coarse evaluation lock acts as an intermediary that protects evaluation integrity without directly blocking fine-grained modification operations on individual records, allowing both operations to proceed concurrently when they operate on different data scopes.
3Reliability
If evaluation locks are held for the entire evaluation time span, then data consistency is improved, but processing speed deteriorates due to extended lock duration
Solution Approach 1:
The patent implements preliminary snapshot creation before evaluations begin, capturing the state of data at the start of the evaluation period. This preliminary action allows the evaluation to proceed on a consistent snapshot without requiring continuous locking, as any subsequent data changes are detected through change pointers and handled through re-evaluation mechanisms rather than blocking locks.
Solution Approach 2:
The patent enables evaluation processes to skip blocking waits by using change pointers to detect data modifications. When changes are detected, the system rushes through a re-evaluation process using updated data snapshots, rather than holding locks for extended periods. This approach minimizes lock duration while ensuring evaluation accuracy through periodic re-evaluation.
Data Source
AI summary
A coarse evaluation lock on data is provided to ensure only one evaluation is run on selected data until completed. A fine exclusive lock on selected data is provided to ensure only one user may change such selected data. The locks may be selectively used during evaluations and while users are changing data.


