[SERVER-31034] apply_ops.cpp should have a unittest Created: 11/Sep/17  Updated: 06/Dec/22  Resolved: 09/Apr/20

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Geert Bosch Assignee: Backlog - Replication Team
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-30510 ApplyOps on an insertion into "system... Closed
Assigned Teams:
Replication
Operating System: ALL
Participants:

 Description   

Recent changes related to relax the global exclusive locking and allowAtomic have created quite a bit of complexity within this file. In SERVER-30510, a behavior change in error handling was reported further indicating that test coverage in this area is light.



 Comments   
Comment by Siyuan Zhou [ 09/Apr/20 ]

I agreed the test coverage of applyOps is light. It's kind of another entry point in the system, so it's hard to test. We have some JS tests for applyOps commands. STM team used to have fuzzer tests for it too, but the problem is it can generate operations that can never happen in reality, e.g. a document removal without a prior collection creation. Since we only support applyOps for MongoMirror, we don't need to support and test all possible operations for applyOps command. One idea to increase the test coverage of applyOps is to extract the oplog entries generated by replset passthrough test and replay them as applyOps command. robert.guo may have more context.

In terms of allowAtomic, we'd hope to remove the support of atomic applyOps once sharding replaces its usage with transactions. The work is tracked in SERVER-33182.

Replication team don't have further plan to add more test coverage for applyOps now. Since the concerns in this ticket have been or will be addressed in other ways, I'm closing this ticket as Won't Fix.

Generated at Thu Feb 08 04:25:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.