Patent ID: 7769792

Claim:
A method of updating data, comprising: on a document processing server having one or more processors and memory, storing a plurality of documents in a repository; during a first epoch: initiating execution of a first set of queries against the repository in a plurality of threads; adding to a first delete list entries identifying first portions of the repository to be deleted, wherein the first portions contain documents made obsolete by new versions of those documents; and maintaining a first count of a number of the threads that reference or potentially reference any of the portions of the repository identified by entries in the first delete list; upon satisfaction of an epoch ending condition, ending the first epoch and starting a second epoch; during the second epoch: initiating execution of a second set of queries against the repository in the plurality of threads; adding to a second delete list entries identifying second portions of the repository to be deleted; continuing to maintain the first count; and maintaining a second count of a number of the threads that reference or potentially reference any of the portions of the repository identified by entries in the second delete list; and after the end of the first epoch, when the first count reaches a predefined value, deleting from the repository all portions of the repository corresponding to the entries in the first delete list.