[SERVER-42223] Use checkpoint cursors for collection validation when {background:true} is requested Created: 12/Jul/19  Updated: 29/Oct/23  Resolved: 04/Sep/19

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

Type: Task Priority: Major - P3
Reporter: Dianna Hohensee (Inactive) Assignee: Dianna Hohensee (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-42218 Enable getCursor() in the RecordStore... Closed
depends on SERVER-42220 Add a getCheckpointCursor() function ... Closed
depends on SERVER-42221 Add concurrency control to checkpoint... Closed
depends on SERVER-42222 Establish the necessary data cursors ... Closed
depends on SERVER-42289 Move collection_test.cpp's validation... Closed
depends on SERVER-42978 Move validate lock acquisition from t... Closed
is depended on by SERVER-30357 Allow users to run the validate cmd w... Closed
Related
is related to SERVER-43134 Only run background validation on che... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2019-08-26, Execution Team 2019-09-09
Participants:

 Description   

Opening the checkpoint cursors must be a mutually exclusive operation with taking new WT checkpoints.



 Comments   
Comment by Githook User [ 03/Sep/19 ]

Author:

{'name': 'Dianna Hohensee', 'email': 'dianna.hohensee@mongodb.com'}

Message: SERVER-42223 Use checkpoint cursors for collection validation when

{background:true}

is requested
Branch: master
https://github.com/mongodb/mongo/commit/82eb1202120ce29c57f55333000a93d338c65baa

Comment by Gregory Wlodarek [ 14/Aug/19 ]

The validate_tests.cpp are already setup to test background validation. We just need to ensure that all existing tests have the corresponding background one attached here.

Comment by Dianna Hohensee (Inactive) [ 13/Aug/19 ]

There might be validation testing in dbtest.

Comment by Dianna Hohensee (Inactive) [ 12/Aug/19 ]

I'd also like to double check what this currently dead code proposes to do differently for background validations and why.

Comment by Dianna Hohensee (Inactive) [ 12/Aug/19 ]

I've been told we update the in-memory collection object's stats with the results of the validate cmd. We'll need to stop doing this for {background:true} because the stats will be based on the checkpoint, not the current state of the collection.

Adding some invariants for mode X lock being held for kValidateFull sections of the code would also be good to have.

UPDATE this looks like it is probably a stats update place. I do not if it is the only one, however.

Lastly, we'll need to re-consider the invariants in collection_validation.cpp, make sure the assumptions are still safe or need to be conditional with background:false being set.

Comment by Dianna Hohensee (Inactive) [ 09/Aug/19 ]

Unit tests will be needed for this functionality.

I would also like to try to add new unit tests for any existing code lacking testing coverage – alternatively, take a look while in the code and file an additional ticket to do add any missing coverage found.

Generated at Thu Feb 08 04:59:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.