DECENTRALIZED RECORD EXPIRY
First Claim
1. A method for automatically deleting an expired record in a distributed database system comprising a plurality of nodes, wherein each node is configured to manage a respective one of a plurality of databases, the method comprising:
- receiving a write request for a record at one of the plurality of nodes, wherein the record is part of a partition stored in the database managed by the one of the plurality of nodes;
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; and
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.
9 Assignments
0 Petitions
Accused Products
Abstract
A technique is described that reduces the complexity and resource consumption associated with performing record expiry in a distributed database system. In accordance with the technique, a record is checked to see if it has expired only when it has been accessed for a read or a write. If at the time of a read a record is determined to have expired, then it is not served. If at the time of a write a record is determined to have expired, then the write is treated as an insertion of a new record, and steps are taken to treat the insertion consistently with regard to the previous expired version. A background process is used to delete records that have not been written to or actively deleted by a client after expiration.
32 Citations
20 Claims
-
1. A method for automatically deleting an expired record in a distributed database system comprising a plurality of nodes, wherein each node is configured to manage a respective one of a plurality of databases, the method comprising:
-
receiving a write request for a record at one of the plurality of nodes, wherein the record is part of a partition stored in the database managed by the one of the plurality of nodes; 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; and 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. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A distributed database system, comprising:
-
a plurality of nodes, wherein the plurality of nodes are interconnected via a communication system; and a plurality of databases, wherein each node in the plurality of nodes is configured to manage a respective one of a plurality of databases; wherein each node in the plurality of nodes is further configured to receive a write request for a record, wherein the record is part of a partition stored in the database managed by the node, to determine whether the record is expired responsive to receiving the write request, to determine if an incarnation number associated with the partition exceeds an incarnation number stored in the record responsive to determining that the record is expired, and, responsive to determining that the incarnation number associated with the partition exceeds the incarnation number stored in the record, to generate 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 to overwrite the expired record with the updated record. - View Dependent Claims (7, 8, 9, 10)
-
-
11. A method for automatically deleting an expired record in a distributed database system comprising a plurality of nodes, wherein each node is configured to manage a respective one of a plurality of databases, the method comprising:
-
reading a record at one of the plurality of nodes, wherein the record is part of a partition stored in the database managed by the one of the plurality of nodes; determining whether the record is expired; 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; and purging the record responsive to determining that the incarnation number associated with the partition exceeds the incarnation number stored in the record. - View Dependent Claims (12, 13)
-
-
14. A distributed database system, comprising:
-
a plurality of nodes, wherein the plurality of nodes are interconnected via a communication system; and a plurality of databases, wherein each node in the plurality of nodes is configured to manage a respective one of a plurality of databases; wherein each node in the plurality of nodes is further configured to read a record, wherein the record is part of a partition stored in the database managed by the node, to determine whether the record is expired, to determine if an incarnation number associated with the partition exceeds an incarnation number stored in the record responsive to determining that the record is expired, and to purge the record responsive to determining that the incarnation number associated with the partition exceeds the incarnation number stored in the record. - View Dependent Claims (15, 16)
-
-
17. A method in a distributed database system for determining which of a first version of a record and a second version of a record is the most recent, comprising:
-
comparing an incarnation number associated with the first version of the record and an incarnation number associated with the second version of the record, wherein each incarnation number represents a version of a partition that existed at the time each record was created; and responsive to determining that one of the first version of the record or the second version of the record has a greater incarnation number, identifying as the most recent the one of the first version of the record or the second version of the record having the greater incarnation number. - View Dependent Claims (18, 19, 20)
-
Specification