[SERVER-49419] Test nested applyOps Created: 10/Jul/20  Updated: 29/Oct/23  Resolved: 13/Oct/20

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

Type: Task Priority: Major - P3
Reporter: Judah Schvimer Assignee: Anthony Perkins (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Repl 2020-10-19
Participants:

 Description   

There appears to be no test coverage of successful nested applyOps outside of the fuzzer. The only test coverage of nested applyOps is this test testing that it fails, but max.hirschhorn points out that the timestamps are malformed, though it is still failing with "Too many nested applyOps" as expected. Max found some test coverage on the 4.0 branch that we appear to have removed.



 Comments   
Comment by Githook User [ 09/Oct/20 ]

Author:

{'name': 'Anthony Perkins', 'email': 'anthony.perkins@mongodb.com', 'username': 'tony-mongodb'}

Message: SERVER-49419 Test nested applyOps
Branch: master
https://github.com/mongodb/mongo/commit/079a2f6b4c102942e1daaef6e6a14fedf0185cc7

Comment by Judah Schvimer [ 27/Jul/20 ]

We should have at least one successful nested applyOps in our passthrough suites and at least one test to confirm that we "flatten" the nested operations in the oplog. Since the operations are flattened in the oplog, more expansive test coverage is probably not worth the necessary effort.

Comment by Tim Fogarty [ 14/Jul/20 ]

Ah good to know! Thanks!

Comment by Judah Schvimer [ 14/Jul/20 ]

applyOps commands can still appear in the source oplog in two ways:
1) single replica-set transactions log an applyOps command in the oplog
2) A user run atomic applyOps (only CRUD ops and 'allowAtomic:true') will get logged as an applyOps command in the oplog

Comment by Tim Fogarty [ 14/Jul/20 ]

Yes, both the tools and mirror can run nested applyOps commands if there are any applyOps in the source oplog. I believe applyOps commands only appear in the oplog in versions pre-3.4? I think that's the only case tools and mirror could run a nested applyOps.

Comment by Ryan Chipman [ 13/Jul/20 ]

I'll defer to tim.fogarty on this one

Comment by Judah Schvimer [ 13/Jul/20 ]

ryan.chipman, do mongomirror or any of the tools ever run nested applyOps commands?

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