×

Controlling visibility in multi-version database systems

  • US 7,305,386 B2
  • Filed: 08/22/2003
  • Issued: 12/04/2007
  • Est. Priority Date: 09/13/2002
  • Status: Expired due to Fees
First Claim
Patent Images

1. A method for controlling visibility of data during transaction processing in a multi-version database management system, comprising:

  • receiving a request for a record stored in a multi-version database from a requesting transaction, the requesting transaction having an associated transaction identifier which uniquely identifies the requesting transaction, a transaction invisibility list which identifies other transactions whose effects are to be invisible to the requesting transaction, and an isolation level which describes whether changes made by other transactions are to be visible to the requesting transaction;

    wherein the transaction identifier is a numeric value and transaction identifiers are assigned to transactions in increasing numerical order based on a start time of the transaction, such that a first transaction can be determined to start before a second transaction if the transaction identifier associated with the first transaction is numerically less than the transaction identifier associated with the second transaction; and

    wherein transaction identifiers associated with transactions that operate in the present have an even numeric value, and transaction identifiers associated with transactions operating “

    as-of”

    a specified “

    as-of”

    time in the past have an odd numeric value;

    wherein the specified “

    as-of”

    time is a time in the past that, when used as a argument in an “

    as-of”

    query, produces the same results as would have been produced if a query occurred in the past at the specified “

    as-of”

    time;

    determining whether the record is visible to the requesting transaction based on the isolation level of the requesting transaction, the transaction identifier, the transaction invisibility list of the requesting transaction, and a creator transaction identifier in the requested record which identifies a transaction that created the record;

    assigning a Record ID value to the record when the record is first created, the Record ID uniquely distinguishing the record from all other records, and the Record ID preserved across modifications of the record;

    finding a transaction identifier for an earliest transaction that started on or after the specified “

    as-of”

    time;

    creating a new transaction, the new transaction having a start-time equal to the specified “

    as-of”

    time, a transaction identifier equal to the transaction identifier for the earliest transaction, minus one, and an isolation level set to Read Committed;

    initializing an invisibility list of the new transaction to include the transaction identifiers of all transactions having transaction identifiers less than the transaction identifier for the new transaction and end-times greater than the specified “

    as-of”

    time;

    removing from the invisibility list of the new transaction, any transactions serialized before transactions visible to the new transaction; and

    adding to a visibility list of the new transaction, any transactions with transaction identifiers greater than the transaction identifier of the new transaction, that are serialized before transactions visible to the new transaction.

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