[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: |
| 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: |
| 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? |