void pruneTill(StoreFindToken token) {
      Iterator<HardDeletePersistItem> itemsIterator = items.iterator();
      while (itemsIterator.hasNext()) {
        HardDeletePersistItem item = itemsIterator.next();
        if (item.startTokenForBlobReadOptions.getType() == FindTokenType.Uninitialized) {
          itemsIterator.remove();
        } else if (item.startTokenForBlobReadOptions.getType() == FindTokenType.JournalBased) {
          // If the startToken for this blobReadOptions is JournalBased, then just don't remove it.
          // This has a potential consequence that the HardDeletePersistItem list would grow to infinite
          // since as HardDeleter moves through the PersistentIndex, it will points to Journal in the end
          // and always stay in Journal.
          // The solution to this problem is to force HardDeleter thread to sleep longer so the IndexPersistor
          // thread in PersistentIndex would be able to call preLogFlush and postLogFlush with startToken being
          // equal to endToken. For instance
          // 1. HardDeleter performs a hard delete, then the startToken is set to be endToken and it sleeps
          //    for 1 minutes
          // 2. Within this one minute, IndexPersistor thread calls preLogFlush, logFlush and postLogFlush,
          //    and since the startToken == endToken, the HardDeletePersistItem will be cleared.
          break;
        } else {
          if (compareTwoTokens(item.startTokenForBlobReadOptions, token) >= 0) {
            break;
          } else {
            itemsIterator.remove();
          }
        }
      }
    }
Prunes entries in the range from the start up to, but excluding, the entry with the passed in token.
Token passed to this method has to be a indexed based one.
ambry-store/src/main/java/com/github/ambry/store/HardDeleter.java