Patent ID: 7783607

Claim:
A method for automatically deleting an expired record in a distributed database system comprising a plurality of nodes, wherein each node comprises one or more processor-based systems and is configured to manage a respective one of a plurality of databases, the method comprising: receiving a write request for a record at the one of the plurality of nodes, wherein the record is one of a plurality of records within a partition stored in the database managed by the one of the plurality of nodes and wherein the partition comprises a distinct portion of a logical database; determining whether the record is expired responsive to receiving the write request; determining if an incarnation number associated with the partition exceeds an incarnation number stored in the record responsive to determining that the record is expired; responsive to determining that the incarnation number associated with the partition exceeds the incarnation number stored in the record, generating an updated record based on the write request, wherein generating the updated record comprises replacing the incarnation number stored in the record with the incarnation number associated with the partition and overwriting the expired record with the updated record; and responsive to determining that the incarnation number associated with the partition does not exceed the incarnation number stored in the record, deleting the expired record, wherein deleting the expired record comprises sending a message to a remote node to increment an incarnation number associated with a partition stored in the database managed by the remote node, generating an updated record based on the write request, and inserting the updated record.