-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Replication
-
Fully Compatible
-
v8.0
-
Repl 2025-03-03
-
0
In the function assertOplogCountForNamespace, we perform a find on the oplog and check that the expected number of entries exist. This function is usually called on both primary and secondary nodes.
On a slow machine, the find result on the secondary may be missing some entries. This is because while the secondary needs to durably write the oplog entries down before we ack a majority write, it may not have applied them yet, due to the oplog writing project. We currently can't read past the lastApplied, so even if the documents exist on the secondary oplog, it won't be returned in a find query.
We should call awaitReplication so that the secondary's last applied is equal to the primary's before we read the oplog.
- related to
-
SERVER-97863 Add a way to query the oplog past the lastApplied
-
- Closed
-