US 12,298,966 B2
Distributed transaction execution management in distributed databases
Graham Timothy Pople, Manchester (GB); Brett Phillip James Lawson, Surrey (CA); Matthew William Ingenthron, Huntington Beach, CA (US); David John Finlay, Mountain View, CA (US); Shivani Gupta, Irvine, CA (US); John Sae Liang, Palo Alto, CA (US); and Stephen Ching-Sing Yen, Atherton, CA (US)
Assigned to Couchbase, Inc.
Filed by Couchbase, Inc.
Filed on Jan. 19, 2024, as Appl. No. 18/418,097.
Application 18/418,097 is a continuation of application No. 17/327,455, filed on May 21, 2021, granted, now 12,032,560.
Claims priority of provisional application 63/029,325, filed on May 22, 2020.
Prior Publication US 2024/0160624 A1, May 16, 2024
This patent is subject to a terminal disclaimer.
Int. Cl. G06F 16/23 (2019.01); G06F 9/54 (2006.01); G06F 16/215 (2019.01); G06F 16/27 (2019.01)
CPC G06F 16/2379 (2019.01) [G06F 9/547 (2013.01); G06F 16/215 (2019.01); G06F 16/27 (2019.01)] 20 Claims
OG exemplary drawing
 
1. A non-transitory computer-readable storage medium for storing instructions that, when executed by a computer processor, cause the computer processor to perform steps comprising:
receiving a first request to execute a first transaction from a first client system at a database node of a distributed database system, the transaction describing a mutation of a record stored at the database node, wherein the record is associated with a check-and-set (CAS) value that is updated responsive to modifications to the record;
retrieving the record from the database node and sending the record to the first client system, causing the first client system to identify the CAS value from the received record;
receiving a second request to execute a second transaction from a second client system at the database node of the distributed database system;
retrieving the record from the database node and sending the record to the second client system, causing the second client system to identify the CAS value from the received record;
receiving a request from the first client system or the second client to attempt to stage a first mutation of the record based on the first transaction or a second mutation of the record based on the second transaction, the request comprising the CAS value received by the first client system or the second client system;
detecting whether a mismatch between the CAS value received with the request and a current CAS value of the record is present, the mismatch indicating that an additional mutation corresponding to an additional transaction has been staged for the record at the database node, the additional mutation conflicting with the first mutation or the second mutation corresponding to the request received from the first client system or the second client system;
responsive to detecting the mismatch, aborting the attempt to execute the first transaction or the second transaction corresponding to the request received from the first client system or the second client system; and
responsive to detecting no mismatch,
staging the first mutation or the second mutation corresponding to the request received from the first client system or the second client system; and
causing the CAS value associated with the record to be updated to a different CAS value.