Abstract:
Multi-thread systems and methods are described for concurrently handling requests to commit data updates to a database by a plurality of data transactions. The database preferably supports multi-versioning and the data transactions are preferably isolated by snapshot isolation. In one embodiment, concurrent and lock-free handling of requests to commit data updates includes performing two types of concurrent data conflict detection. A transaction proceeds to commit only if it passes both types of conflict detection. The first type of conflict detection is based on a hash map between data keys and their commit timestamps whereas the second type of conflict detection is based on a log that keeps track of the status of transactions whose requests to commit are actively being processed. In another embodiment, concurrent conflict detection for data items in concurrent transactions is broken down into buckets and locks are used for accessing each bucket. These systems and methods maintain transactional integrity to database while improving throughput by maximizing concurrency of data commits in a multi-thread environment.
Abstract:
The present teaching relates to concurrency control in log-structured merge (LSM) data stores. In one example, a call is received from a thread for writing a value to a key of LSM components. A shared mode lock is set on the LSM components in response to the call. The value is written to the key once the shared mode lock is set on the LSM components. The shared mode lock is released from the LSM components after the value is written to the key.
Abstract:
In one embodiment, a set of lock and unlock instructions in a read phase of a computer-readable program is replaced with a first set of tracking instructions, wherein the first set of tracking instructions track a set of locked objects identifying objects that would have been locked by executing the set of lock and unlock instructions. A second set of tracking instructions is inserted into the read phase of the computer-readable program, wherein the second set of tracking instructions track a set of read objects indicating versions of objects that are read. Validation instructions are inserted into the computer-readable program, wherein the validation instructions validate that the versions of objects in the set of read objects have not changed since they were last read and lock the set of locked objects that would have been locked upon completing execution of the set of lock and unlock instructions. Update instructions are added to an update phase of the computer-readable program, where the update instructions increment a current version of an object each time a value of the object is updated or a lock of the object is released.
Abstract:
In one embodiment, a set of lock and unlock instructions in a read phase of a computer-readable program is replaced with a first set of tracking instructions, wherein the first set of tracking instructions track a set of locked objects identifying objects that would have been locked by executing the set of lock and unlock instructions. A second set of tracking instructions is inserted into the read phase of the computer-readable program, wherein the second set of tracking instructions track a set of read objects indicating versions of objects that are read. Validation instructions are inserted into the computer-readable program, wherein the validation instructions validate that the versions of objects in the set of read objects have not changed since they were last read and lock the set of locked objects that would have been locked upon completing execution of the set of lock and unlock instructions. Update instructions are added to an update phase of the computer-readable program, where the update instructions increment a current version of an object each time a value of the object is updated or a lock of the object is released.