Deadlock detection in distributed databases

    公开(公告)号:US11809916B2

    公开(公告)日:2023-11-07

    申请号:US17647752

    申请日:2022-01-12

    Applicant: Snowflake Inc.

    CPC classification number: G06F9/524 G06F16/2343 G06F16/2379 G06F16/256

    Abstract: The subject technology performs a locking operation on a first set of keys by a first statement of a first transaction. The subject technology determines that a conflict occurred between the first statement and a second transaction. The subject technology determines that the second transaction has yet to complete after a predetermined period of time. The subject technology performs a deadlock detection process where the subject technology stores a key and value in a table indicating the first transaction and the second transaction, detects, based at least in part on a graph traversal of the table starting from the first transaction, a cycle between the first transaction and the second transaction, and determines that the first transaction is a youngest transaction in the detected cycle. The subject technology ceases execution of the first transaction in response to the first transaction being a youngest transaction in a detected cycle.

    CONCURRENCY CONTROL FOR TRANSACTIONS IN DATABASE SYSTEMS

    公开(公告)号:US20220405266A1

    公开(公告)日:2022-12-22

    申请号:US17821581

    申请日:2022-08-23

    Applicant: Snowflake Inc.

    Abstract: The subject technology inserts, by a first transaction, a new version of an object, the first transaction including a first statement to perform an update operation to a row in a first table, the object corresponding to data in the row to be updated, the first statement including information comprising an object key associated with the object. The subject technology performs, by a second transaction, a range read, the range read including information indicating the object key. The subject technology receives a set of conflicting transactions from the range read. The subject technology determines that a conflict occurred between the first transaction and a third transaction from the set of conflicting transactions. The subject technology performs a restart of the first transaction in response to determining that the conflict occurred.

    FENCING MECHANISM OF STATEMENTS FOR DISTRIBUTED MULTI-VERSION CONCURRENCY CONTROL

    公开(公告)号:US20240378187A1

    公开(公告)日:2024-11-14

    申请号:US18313834

    申请日:2023-05-08

    Applicant: Snowflake Inc.

    Abstract: The subject technology determines that a request to commit a transaction has been received. The subject technology prior to committing the transaction, performs a write operation to store a metadata version of a table associated with the transaction in a metastore. The subject technology performs a register operation to register a background worker. The subject technology performs, by the background worker, a trigger operation to perform an execution node job on an execution node. The subject technology retrieves, by the execution node job, a set of identifiers of active transactions. The subject technology performs, by the execution node job, a write operation to store the metadata version of the table and the set of identifiers in a datastore. The subject technology receives, by the background worker, an indication that the execution node job has successfully completed. The subject technology performs an unlock operation to unlock the table.

    CONCURRENT TRANSACTION PROCESSING IN A DATABASE SYSTEM

    公开(公告)号:US20220092051A1

    公开(公告)日:2022-03-24

    申请号:US17163034

    申请日:2021-01-29

    Applicant: Snowflake Inc

    Abstract: The subject technology receives a first transaction. The subject technology assigns a first read version to the first transaction, the first read version indicating a first version of the linearizable storage. The subject technology performs a read operation from the first transaction on a table in a database. The subject technology determines a first commit version identifier corresponding to first data resulting from the read operation. The subject technology, in response to determining that a particular write operation is absent from the first transaction, proceeding to execute a different transaction and foregoing to perform a commit process in connection with the first transaction.

    ONLINE INDEX CREATION FOR MULTI-VERSION DATABASE WITHOUT TABLE LOCKS

    公开(公告)号:US20240394244A1

    公开(公告)日:2024-11-28

    申请号:US18790664

    申请日:2024-07-31

    Applicant: Snowflake Inc.

    Abstract: The subject technology initiates an online index building process of an index of a hybrid table. The subject technology includes, in the index, a new index record for each record from the hybrid table. The subject technology validates the index. The subject technology retrieves a first metadata version of the hybrid table from a metadata database. The subject technology retrieves a second metadata version of the hybrid table from a distributed data store. The subject technology compares the first metadata version with the second metadata version. The subject technology determines that the second metadata version is less than or equal to the first metadata version. The subject technology, in response to successfully validating the index, indicates in a particular entry of the index that validation of the index has succeeded.

    SCALABLE COMPACTION FOR A DISTRIBUTED DATABASE

    公开(公告)号:US20230325409A1

    公开(公告)日:2023-10-12

    申请号:US18326683

    申请日:2023-05-31

    Applicant: Snowflake Inc.

    CPC classification number: G06F16/273 G06F16/2343 G06F16/2379

    Abstract: The subject technology performs, using asynchronous threads of execution nodes of a distributed database, asynchronous transformation and compaction of key-value pairs of data that correspond to a plurality of transactional queries, the asynchronous threads transforming the key-value pairs from an initial format to a commit format that includes a commit time of data committed to the distributed database, the asynchronous threads compacting the key-value pairs by deleting the key-value pairs in the initial format. The subject technology processes, using transactional threads in the execution nodes, the plurality of transactional queries to generate results data, the asynchronous threads performing the asynchronous transformation and compaction while the transactional threads generate the results data. The subject technology stores the results data.

    CONCURRENT TRANSACTIONS CONSISTENCY IN DATABASE SYSTEMS

    公开(公告)号:US20230325376A1

    公开(公告)日:2023-10-12

    申请号:US18326950

    申请日:2023-05-31

    Applicant: Snowflake Inc.

    CPC classification number: G06F16/2329 G06F16/2282 G06F16/24568 G06F16/248

    Abstract: The subject technology performs a read operation from a first transaction on a table in a database. The subject technology determines a first commit version identifier corresponding to first data resulting from the read operation. The subject technology proceeds to perform a particular write operation from the first transaction. The subject technology determines that the first commit version identifier fails to match a second commit version identifier corresponding to a second transaction. The subject technology aborts the particular write operation from the first transaction. The subject technology performs a particular read operation from the first transaction. The subject technology determines a particular commit version identifier corresponding to particular data resulting from the particular read operation. The subject technology retries to perform the particular write operation. The subject technology performs the particular write operation in response to the particular commit version identifier matching the second commit version identifier.

Patent Agency Ranking