|
The OplogBatcher counts the oplog entries to decide when to start a new batch, however for applyOps entries, the current counting mechanism is incorrect: it uses the 'count' field in applyOps, but this field only exists for non-initial implicit commit and prepare entries. So for single entry applyOps entries, the 'count' field does not exist and we would just return 1. This is a bug today and might become a bigger problem after PM-2780 where we might group up normal CRUD in an applyOps entry.
The original intention of not having 'count' field in single entry applyOps seems to be that we can derive it from the applyOps array, however do that is bit expensive, so I think it's better to have 'count' field in single entry applyOps as well.
|