×

In-memory database system providing lockless read and write operations for OLAP and OLTP transactions

  • US 10,127,260 B2
  • Filed: 11/25/2014
  • Issued: 11/13/2018
  • Est. Priority Date: 11/25/2014
  • Status: Active Grant
First Claim
Patent Images

1. A method for implementation by a database system comprising a combination of on-disk storage and in-memory storage, the method comprising:

  • storing, in a plurality of fragments comprising at least a delta fragment and a main fragment retained in the on-disk storage, a plurality of data records that comprise a table, each fragment having visibility data structures to enable multi-version concurrency control (MVCC), the visibility data structures comprising at least one bit identifying a visibility of a row in the table, wherein MVCC information is maintained for each row of each fragment as such rows are inserted, updated, and deleted, the MVCC information comprising at least both of a creation timestamp and a destruction timestamp for each row;

    compressing the delta fragment and the main fragment using n-bits compression to generate a compressed main fragment and a compressed delta fragment;

    in response to operations comprising read and/or write operations on the row of the table, loading the compressed main fragment and the compressed delta fragment into main system memory in the in-memory storage from the on-disk storage when the compressed main fragment and the compressed delta fragment are accessed for the operations and are not already in the main system memory;

    accessing a multi-version concurrency control object to obtain a current system timestamp for the row;

    concurrently performing the operations on the row, while providing snapshot isolation, on the at least one of the compressed main fragment and the compressed delta fragment while the at least one of the compressed main fragment and the compressed delta fragment is in the main system memory, wherein the providing snapshot isolation comprises;

    making the row visible for allowing changes during concurrent performing of the operations comprising a plurality of lockless read and/or write operations on the compressed delta fragment, the visibility of the row based on the current system timestamp corresponding to when the operations began, the making of the row visible comprising setting the at least one bit to identify the row as visible; and

    generating a new system timestamp when the operations commit, such that the new system timestamp becomes a commit identifier for the row; and

    wherein a transaction attempting to read rows in a fragment establishes the visibility of each row, optimally for data set reads with varying granularity levels ranging from single row to the whole table, by;

    comparing a base timestamp of a consistent view of the transaction with the MVCC information for the row;

    orcomparing a control block of the transaction with a referenced transaction control block referred to by the creation or destruction timestamp within the MVCC information.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×