主权项 |
1. A method for multiversioned position-space indexing of a storage system, the method comprising:
creating, by data processing hardware, an empty index; adding, by the data processing hardware, at least one data entry to the index; creating, by the data processing hardware, a new index layer that includes all data entries added since a last layer creation; dividing, by the data processing hardware, the index layer into sublayers; storing, by the data processing hardware, the index entry in a local position space of an appropriate one of the sublayers, associating the entry with a range of positions occupied by an object to which the entry corresponds; creating, by the data processing hardware, a global position space to expose an index snapshot of the index; exposing, by the data processing hardware, index entries and the entries' global positions in the snapshot using a mapping between each layer's local position space and the index's global position space; querying a particular timestamp of the index snapshot; constructing, by the data processing hardware, a liveness map for the particular timestamp before reading any index entries, the liveness map mapping live index entries having positions known to be live at the particular timestamp; and exposing, by the data processing hardware, the live index entries in the constructed liveness map while bypassing all non-live index entries having positions that fall within non-live position ranges. |