Details
-
Improvement
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
None
Description
This subtask is about spawning out a comment from chetanm re JournalGC:
Further looking at JournalGarbageCollector ... it would be simpler if you record the journal entry timestamp as an attribute in JournalEntry document and then you can delete all the entries which are older than some time by a simple query. This would avoid fetching all the entries to be deleted on the Oak side
and a corresponding reply from myself:
Re querying by timestamp: that would indeed be simpler. With the current set of DocumentStore API however, I believe this is not possible. But: DocumentStore.query comes quite close: it would probably just require the opposite of that method too:
public <T extends Document> List<T> query(Collection<T> collection, String fromKey, String toKey, String indexedProperty, long endValue, int limit) {.. or what about generalizing this method to have both a startValue and an endValue - with -1 indicating when one of them is not used?