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

List checkpoints

    XMLWordPrintableJSON

Details

    Description

      Introduce a new method on NodeStore that lists the currently valid checkpoints:

          /**
           * Returns all currently valid checkpoints.
           *
           * @return valid checkpoints.
           */
          @Nonnull
          Iterable<String> checkpoints();
      

      The NodeStore interface already has methods to create and release a checkpoint, as well as retrieving the root state for a checkpoint, but it is currently not possible to list checkpoints. Using the checkpoint facility as designed right now can lead to a situation where a checkpoint is orphaned. That is, some code created a checkpoint but was unable to store the reference because the system e.g. crashed. Orphaned checkpoints can affect garbage collection because they prevent it from cleaning up old data. Right now, this requires users to run tools like oak-run to get rid of those checkpoints.

      As suggested in OAK-4826, client code should be able to automatically clean up unused checkpoints. This requires a method to list existing checkpoints.

      Attachments

        1. OAK-4850.patch
          8 kB
          Marcel Reutegger

        Issue Links

          Activity

            People

              mreutegg Marcel Reutegger
              mreutegg Marcel Reutegger
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: