code: @InterfaceAudience.Private
      private void removePending(RevisionInternal revisionInternal) {
          synchronized (pendingSequencesLock) {
              long seq = revisionInternal.getSequence();
              if (pendingSequences == null || pendingSequences.isEmpty()) {
                  Log.w(TAG, "%s: removePending() called w/ rev: %s, but pendingSequences empty",
                          this, revisionInternal);
                  if (revisionInternal.getBody() != null)
                      revisionInternal.getBody().release();
                  pauseOrResume();
                  return;
              }
              boolean wasFirst = (seq == pendingSequences.first());
              if (!pendingSequences.contains(seq)) {
                  Log.w(TAG, "%s: removePending: sequence %s not in set, for rev %s",
                          this, seq, revisionInternal);
              }
              pendingSequences.remove(seq);
              if (wasFirst) {
                  // If I removed the first pending sequence, can advance the checkpoint:
                  long maxCompleted;
                  if (pendingSequences.size() == 0) {
                      maxCompleted = maxPendingSequence;
                  } else {
                      maxCompleted = pendingSequences.first();
                      --maxCompleted;
                  }
                  setLastSequence(Long.toString(maxCompleted));
              }
              if (revisionInternal.getBody() != null)
                  revisionInternal.getBody().release();
              pauseOrResume();
          }
      }
docs: Removes a revision from the "pending" set after it's been uploaded. Advances checkpoint.
  - (void) removePending: (CBL_Revision*)rev in CBLRestPusher.m