[SERVER-74793] dbCheck behaves differently on primaries and secondaries w.r.t extra _id index entries Created: 13/Mar/23 Updated: 16/Nov/23 Resolved: 21/Apr/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0, 7.0.0-rc2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Daniel Gottlieb (Inactive) | Assignee: | Louis Williams |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Assigned Teams: |
Storage Execution
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||
| Backport Requested: |
v7.0, v6.3, v6.0, v5.0, v4.4
|
||||||||||||||||||||||||
| Sprint: | Execution Team 2023-05-01 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Linked BF Score: | 8 | ||||||||||||||||||||||||
| Description |
|
When a collection is in an inconsistent state such that:
A primary processing a dbCheck command will write an "extra index key" error into the health log (complete with a backtrace):
A primary will then abort the rest of the dbcheck (replicates a "dbCheckStop" oplog entry). A secondary that's processing a dbcheck oplog entry will not notice the extra _id index entry. It will* log that its dbcheck failed in the event that the record store document should exist:
It would be better if secondaries also logged an extra _id index entry error so we could distinguish between index inconsistency (a storage problem) and data inconsistency (a replication problem). |
| Comments |
| Comment by Githook User [ 01/Nov/23 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}Message: Revert " This reverts commit 3170c79ed4aea301c170b10c09cec85336a20777. |
| Comment by Githook User [ 09/Oct/23 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}Message: (cherry picked from commit 9a03e1930b2ffe150f21ac9836a70d799e353015) |
| Comment by Githook User [ 18/May/23 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}Message: (cherry picked from commit 9a03e1930b2ffe150f21ac9836a70d799e353015) |
| Comment by Githook User [ 19/Apr/23 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}Message: |
| Comment by Louis Williams [ 14/Mar/23 ] |
|
It seems like the primary's behavior could be improved as well. We shouldn't stop dbCheck if we find one bad key, but rather continue checking in batches. |