[SERVER-70779] background validation fails due to inconsistent view of index spec and keys Created: 21/Oct/22  Updated: 24/Jan/24  Resolved: 30/Nov/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.3.0-rc0

Type: Bug Priority: Major - P3
Reporter: Benety Goh Assignee: Gregory Wlodarek
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-83593 Add timestamp support to validate_tes... Open
Fix
fixes SERVER-69422 Remove checks on out-of-sync in-memor... Closed
Problem/Incident
causes PYTHON-4087 [Build Failure] test_validate_collect... Closed
Related
is related to PYTHON-4072 Flaky test: test.test_database.TestDa... Closed
Assigned Teams:
Storage Execution
Backwards Compatibility: Minor Change
Operating System: ALL
Backport Requested:
v7.2, v7.0
Sprint: Execution Team 2023-11-27, Execution Team 2023-12-11
Participants:
Linked BF Score: 135

 Description   

When validating a collection with the {{

{background: true}

}} option, we read the collection and index keys at a timestamp established here in the validation code. Even though the index spec is consistent with the keys at the time the cursor is established, it is possible for the index definition to change (e.g. non-unique to unique) before we start to inspect the index keys.

This inconsistent view of the index catalog and index keys may lead to validation failures that are not reflective of a real issue in the collection.



 Comments   
Comment by Shane Harvey [ 18/Dec/23 ]

gregory.wlodarek@mongodb.com, this change also seems to have introduced another behavior change as evidenced by the failing test in PYTHON-4087. Is that test failure expected? Does the test need to wait for the the collection to be created in the majority snapshot before running the validate command (eg by using w:majority)?

Comment by Gregory Wlodarek [ 04/Dec/23 ]

Background validation cannot be executed against:

  • Unreplicated collections
  • Against a standalone mongod
Comment by Githook User [ 30/Nov/23 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-70779 Refactor background validation to use point-in-time catalog lookups
Branch: master
https://github.com/mongodb/mongo/commit/101e6b16abdc00cc18134b9ca6aa4a996802e754

Generated at Thu Feb 08 06:17:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.