Newly-pulled docs shouldn't show up in pusher's pendingDocuments #1332
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When the pusher is notified of a new revision, but decides to ignore it
because it's an 'echo' from a pull replication (or because it's rejected
by the filter), it should advance the checkpoint past that rev's
sequence.
This is a good optimization in general, to prevent the next push from
re-scanning the same revisions, but more importantly it tells
CBLReplication.pendingDocuments that those revisions aren't pending.
To fix this I did have to change the timing at which the pusher adds
revs to its internal _pendingSequences set, because it needs to happen
at the same time that skipped sequences are being handled.
Fixes #1274