Designing Effective Lock-Based Concurrency Control in Database Systems - Vipul Kumar Bondugula (International Journal of Intelligent Systems and Applications in Engineering, 2021)
Database systems, managing concurrency is critical to maintaining data integrity, especially when multiple users or processes access and modify data simultaneously. One of the core tools used for this purpose is locking. Locks regulate access to data, ensuring that only one transaction can write to a data item at a time, while multiple transactions may be allowed to read concurrently depending on the lock type. Read operations commonly use shared locks, which allow several transactions to read the same data without interference, while write operations require exclusive locks to prevent other operations from accessing the data simultaneously. To manage these locks effectively, various locking mechanisms have been developed. Pessimistic locking assumes conflicts are likely and locks data before access, whereas optimistic locking assumes conflicts are rare and checks for conflicts only at the time of commit. Another widely used method is two-phase locking (2PL), which ensures serializability by dividing the transaction into a lock-acquisition phase followed by a lock-release phase. In distributed systems such as those built with Kubernetes or etcd, traditional locking methods are extended with mechanisms like lease-based locking. This approach grants a time-bound lease to a client, allowing it to perform operations for a limited duration. If the client fails or becomes unreachable, the lease expires automatically, releasing the lock and preventing deadlock or indefinite resource blocking. This method is particularly valuable in distributed environments where fault tolerance and automatic recovery are essential. Lease-based locking is a mechanism where a lock is acquired for a specified duration, allowing the holder to perform tasks within that time frame. After the lease expires, the lock is released automatically, ensuring that other processes can attempt to acquire it. This method helps prevent deadlocks and reduces the contention for resources in distributed systems. Although the internal mechanics vary across systems, the principle remains consistent locks help serialize access to resources, ensuring consistency and correctness. Whether used in traditional relational databases or modern distributed platforms, locking continues to be a fundamental strategy for safe and reliable transaction management under concurrent workloads. Lease based locking mechanism is having through put performance issues. This paper addresses this issue using basic lease based locking mechanism.