-
Type:
Bug
-
Resolution: Gone away
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Sharding
-
None
-
Replication
-
ALL
-
v7.1
-
148
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
The logic to write a batch in ReshardingCollectionCloner::doOneBatch was recently split into another writeOneBatch function, which is called from the path using the natural order pipeline. However, the natural order pipeline does not guard against attempt to write a batch with size 0, whereas the original code path does.
It's possible if the batch returned by the cursor is size 0, then we eventually call getNextOpTimes() with count = 0, which will trigger an invariant in _advanceComponentTimeByTicks when we try to increment the vector clock by 0 ticks. This is seen in BF-29741.