×

Method and system for forward reference logging in a persistent datastore

  • US 9,703,816 B2
  • Filed: 12/19/2013
  • Issued: 07/11/2017
  • Est. Priority Date: 11/19/2013
  • Status: Active Grant
First Claim
Patent Images

1. A method of recovering persisted data, comprising:

  • at an electronic system with one or more processors and memory;

    generating a first log entry associated with first write data to be stored in a persistent data store, wherein the first log entry includes information sufficient to replay a transaction corresponding to the first write data;

    generating a forward reference identifier for a second record of a plurality of sequential records that is different from a first record of the plurality of sequential records, wherein each respective record of the plurality of sequential records includes a respective log entry, write data that was not yet stored in the persistent data store when said log entry was generated, a respective reference identifier for the respective record, a forward reference identifier for a next record in the sequence, and a pointer to a next record in the sequence;

    generating the first record including the first log entry, the first write data, the forward reference identifier for the second record, and a pointer to the second record;

    performing a single write operation that includes writing the first record to the persistent datastore, wherein;

    the pointer to the second record is a pointer to a location in the persistent data store allocated for writing the second record prior to writing the first record and the second record to the persistent datastore, andthe forward reference identifier for the second record is different from the pointer to the second record; and

    performing a recovery operation that includes;

    reading the first log entry;

    using the pointer to the second record to read a second log entry;

    determining whether the forward reference identifier for the second record matches a second reference identifier in the second record;

    in accordance with a determination that the forward reference identifier for the second record matches the second reference identifier in the second record, replaying a transaction associated with the second log entry; and

    in accordance with a determination that the forward reference identifier for the second record does not match the second reference identifier in the second record, stopping the recovery operation.

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