主权项 |
1. A method for monitoring usage of one or more data units in a distributed network utilizing snapshots, comprising:
configuring, by a processor, the snapshots to store a state of the distributed network at a point in time; labeling, by the processor, a snapshot as a long-lived snapshot or a short-lived snapshot; avoiding, by the processor, reference counts of the one or more data units associated with each short-lived snapshot from being updated at a creation time and a deletion time of each respective short-lived snapshot; reference counting, by the processor, changes to the one or more data units associated with each long-lived snapshot each time the one or more data units are updated; performing, by the processor, a first reference count update when the snapshot is a short-lived snapshot, the first reference count update including at least one of:
decreasing the reference counts of the data units when reference count background updates are actively updating,reverting the reference count background updates for decreasing the reference counts on each of the data units, andstarting the reference count background updates and decreasing the reference counts on each of the data units when the reference count background updates are not actively updating; and performing, by the processor, a second reference count update that is different than the first reference count update when the snapshot is a long-lived snapshot. |