Align OffsetScrolling to zero-based indexes.

Closes: #4673
Original pull request: #4678
This commit is contained in:
Christoph Strobl
2024-04-03 14:49:55 +02:00
committed by Mark Paluch
parent abbe4f308d
commit be3372ba0a

View File

@@ -312,7 +312,7 @@ public class Query implements ReadConcernAware, ReadPreferenceAware {
Assert.notNull(position, "ScrollPosition must not be null");
this.skip = position.getOffset();
this.skip = position.isInitial() ? 0 : position.getOffset() + 1;
this.keysetScrollPosition = null;
return this;
}