[SERVER-51228] dbHash should return SnapshotUnavailable if _id index is not visible in the current snapshot Created: 29/Sep/20  Updated: 29/Oct/23  Resolved: 05/Oct/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.9.0

Type: Bug Priority: Major - P3
Reporter: Louis Williams Assignee: Louis Williams
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2020-10-05, Execution Team 2020-10-19
Participants:
Linked BF Score: 21

 Description   

The test-only command 'emptycapped' drops and recreates all indexes. Because of this, it is possible for dbHash to pick a read timestamp where the new _id index is not visible yet. Instead of returning a 'no _id index' error, dbHash should return a SnapshotUnavailable error, which is already an expected and routine error code. 

This problem can be fixed by having 'emptycapped' set the collection's minimumVisibleSnapshot.



 Comments   
Comment by Githook User [ 03/Oct/20 ]

Author:

{'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}

Message: SERVER-51228 emptycapped should set the collection minimumVisibleSnapshot to cause dbHash to return a SnapshotUnavailable error
Branch: master
https://github.com/mongodb/mongo/commit/d8ed47db10e21e648ff7486827a7e779335a35a4

Comment by Githook User [ 02/Oct/20 ]

Author:

{'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}

Message: Revert "SERVER-51228 dbHash should return SnapshotUnavailable if the _id index is not visible or ready"

This reverts commit 00cc67fc18f2ef81a2d08d962eca1f2907e3b51e.
Branch: master
https://github.com/mongodb/mongo/commit/fa5862fd119a51df74886d6df634911de114004a

Comment by Githook User [ 01/Oct/20 ]

Author:

{'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}

Message: SERVER-51228 dbHash should return SnapshotUnavailable if the _id index is not visible or ready
Branch: master
https://github.com/mongodb/mongo/commit/00cc67fc18f2ef81a2d08d962eca1f2907e3b51e

Generated at Thu Feb 08 05:24:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.