[SERVER-33359] Have RTT storage engines manage rolling back incomplete index builds. Created: 15/Feb/18 Updated: 29/Oct/23 Resolved: 22/Feb/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication, Storage |
| Affects Version/s: | None |
| Fix Version/s: | 3.7.3 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Daniel Gottlieb (Inactive) | Assignee: | Daniel Gottlieb (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | rollback-functional | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Sprint: | Repl 2018-02-26 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
In an RTT world, nodes must retain enough history to undo writes back to the replica set commit point. However, replication does not always communicate enough information to reliably know what the state should be at the commit point. Specifically, the view of a database when an index build is occurring is not sufficient to know whether the index creation had committed, or it was rolled back. The lifetime of an index build on a primary:
An index build on a secondary:
Storage only knows about the existence of the catalog entry and the value of its `ready` flag. to make a decision on whether the index build should be completed. In both cases, if the entry does not exist, the index should be removed. If the entry does exist with `ready: true`, it should remain. However, the primary case should roll back the case where the index entry exists, but is `ready: false` as this represents a time before it wrote out the oplog entry. A secondary must keep the index given the same inputs as the oplog entry was written before the index build started. Losing the index would be a bug. This ticket is for index builds to communicate enough information to the storage engine to disambiguate the decision. The storage engine may choose persist this information as it sees fit. It's only expected to be of value for RTT storage engines. Specifically what will be communicated is whether the index to be built is a background index build being started on a secondary. Foreground index builds on a secondary will not show as "in progress" following a call to RTT, either the index is not in the catalog, or the entry exists and the index is usable. |
| Comments |
| Comment by Daniel Gottlieb (Inactive) [ 22/Feb/18 ] |
|
--noIndexBuildRetry is no longer compatible with --replSet.
|
| Comment by Githook User [ 22/Feb/18 ] |
|
Author: {'email': 'daniel.gottlieb@mongodb.com', 'name': 'Daniel Gottlieb', 'username': 'dgottlieb'}Message: |