Patent ID: 11874822
Assignee: AMAZON TECHNOLOGIES, INC.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 0:
1. A computer-implemented method comprising:
receiving, at a transaction coordinator, a start transaction request message seeking to initiate an atomic and isolated transaction;
generating, by the transaction coordinator, a transaction identifier for the transaction;
updating by the transaction coordinator, a transaction log entry for the transaction, the transaction log entry to include at least a transaction status value, the transaction identifier, identifiers of a first data stream and a second data stream as being part of the transaction, and identifiers of a first shard and a second shard as being part of the transaction;
obtaining, by the transaction coordinator from one or more clients, a first event to be inserted into the first data stream and a second event to be inserted into the second data stream as part of the transaction;
writing, by the transaction coordinator, the first event and the second event to a transaction buffer, wherein the transaction buffer is backed by a non-volatile storage, wherein: the transaction buffer is implemented as a third shard, wherein at least one entry in the transaction buffer comprises a pointer to a corresponding entry in the first shard or the second shard; or the transaction buffer is implemented as part of the first shard, wherein entries in the first shard that are part of the transaction buffer include at least an additional field or value indicating membership of the entry in the transaction buffer;
providing visibility, via use of the transaction buffer, of the first and second events to the one or more clients within the transaction, while purposefully not providing visibility of the first and second events to other clients performing other transactions involving the first or second data streams;
determining, based on use of an optimistic concurrency control (OCC) mechanism, that the first event cannot be written to the first shard; and
aborting the transaction by the transaction coordinator, comprising removing the first event and the second event from the transaction buffer and updating the transaction status value of the transaction log entry for the transaction to indicate that the transaction was aborted.