Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-3001

Simplify JournalGarbageCollector using a dedicated timestamp property

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 1.5.14, 1.6.0
    • core, mongomk

    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?

      Attachments

        1. OAK-3001.take1.patch
          26 kB
          Vikas Saurabh

        Issue Links

          Activity

            People

              catholicon Vikas Saurabh
              stefanegli Stefan Egli
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: