ayende/ravendb — pull request #64 by chripede (2011-10-21 09:20:11+00:00)
Title: Expiration bundle fails to delete more than 1024 documents

The ExpiredDocumentsCleaner selects 1024 documents, deletes them and if they are deleted, tries to select another 1024 for deletion. It does however select exactly the same 1024 documents (queryResult.IsStale is false - bug?) causing deleted to be false and the loop exits.

Moving generation of the Cutoff time into the while loop seems to fix the problem, and all documents are now removed.