[SERVER-33377] MultiIndexBlock builder can incorrectly change an InterruptedAtShutdown error into a uassert Created: 16/Feb/18 Updated: 29/Oct/23 Resolved: 18/Apr/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance, Storage |
| Affects Version/s: | None |
| Fix Version/s: | 3.7.6 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Daniel Gottlieb (Inactive) | Assignee: | Eric Milkie |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||
| Sprint: | Storage NYC 2018-04-23 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 59 | ||||||||||||||||
| Description |
|
The `IndexBuilder` class is used for secondaries to build indexes. A secondary receiving a message (oplog) to build an index implies the index must exist, thus if the index build has an error, there is logic to crash the node. Notably, the "interrupted" (for shutdown) error code is exempt from crashing. Errors can come up while an index build is iterating through documents, including being interrupted for shutdown. However, the code indiscriminately turns all errors into a `uassert`. This uassert is not treated by the former fassert as an interruption error, crashing the server instead of performing a graceful shutdown. Note: I did confirm that the clean shutdown and the crashing cases both leave the index in an "unready" state and will be rebuilt when the node comes back up. |
| Comments |
| Comment by Eric Milkie [ 18/Apr/18 ] |
|
With this code change, index builds can no longer return an error with code 28550, and instead may return errors with any of the Interrupted* codeNames (although I believe it was already possible for those errors to be returned). Code 28550 no longer exists in the codebase. |
| Comment by Githook User [ 18/Apr/18 ] |
|
Author: {'email': 'milkie@10gen.com', 'name': 'Eric Milkie', 'username': 'milkie'}Message: |