[SERVER-34853] rollback (or replay during recovery) of emptycapped leads to invariant Created: 04/May/18 Updated: 06/Dec/22 Resolved: 29/Jan/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Judah Schvimer | 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: |
|
|||||||||||||||||||||||||||||||||||
| Assigned Teams: |
Replication
|
|||||||||||||||||||||||||||||||||||
| Operating System: | ALL | |||||||||||||||||||||||||||||||||||
| Steps To Reproduce: |
|
|||||||||||||||||||||||||||||||||||
| Participants: | ||||||||||||||||||||||||||||||||||||
| Description |
|
emptycapped is a test command, so this is low priority, and I do not think any other code can hit this. If an emptycapped command is replayed during replication recovery on a collection that wasn't marked for size adjustment, then it will invariant here.
This is both a problem for replication recovery at startup and for recovery after rollback. |
| Comments |
| Comment by Eric Milkie [ 08/May/18 ] |
|
It's not something that will be going away soon; in fact, we are planning on making a real database "truncate" command that will operate in the same way. I think we can let this ticket sit in the backlog (or resolve it as Wont Fix) until we start work on "truncate". |
| Comment by Spencer Brody (Inactive) [ 07/May/18 ] |
|
milkie Can you comment on the utility of the emptycapped command for testing? It doesn't seem to be used in many tests, and the ones that it is used for seem to be mainly testing its specific behavior. If we just deleted this command and the tests that use it, would we be losing meaningful test coverage for storage's oplog truncation behavior? |
| Comment by Judah Schvimer [ 04/May/18 ] |
|
Per kyle.suarez's recommendation, a proposed fix is:
We must also fix this for startup recovery and write a test for both scenarios. |