[SERVER-43757] background validate must skip indexes whose persisted and in-memory idents do not match Created: 02/Oct/19  Updated: 29/Oct/23  Resolved: 04/Oct/19

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

Type: Bug 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
is depended on by SERVER-42358 Add background collection validation ... Closed
Related
related to SERVER-56877 insert operations may fail to set ind... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2019-10-07
Participants:

 Description   

At the start of collection validation, we open collection and index cursors. If an index's (by name) persisted ident differs from the latest index (by name) ident, then it must be skipped.

Currently, we read a PIT view of persisted collection catalog entry to find the index names. Then, we iterate through the in-memory indexes, filter out any that aren't in the persisted PIT view, then open and save cursors on the remaining indexes.

The filtering out of indexes that are not in the PIT view is necessary for validate with {background:true} where we read from the checkpoint view. However, we have a bug when an index gets checkpoint'ed, then the index is dropped (deferred, 1st phase of drop), then the index is recreated. It will appear in the checkpoint's catalog view, but then we'll read from the recreated index instead that is not checkpoint'ed. Apparently, the current behavior here is to successfully read from the recreated index even if we ask for a kCheckpoint read source. Therefore, we should filter out any indexes from the PIT persisted view that has an ident that no longer matches the in-memory representation of that index (i.e. the index was recreated and is not in the checkpoint).



 Comments   
Comment by Githook User [ 04/Oct/19 ]

Author:

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

Message: SERVER-43757 background validate must skip indexes whose persisted and in-memory idents do not match
Branch: master
https://github.com/mongodb/mongo/commit/c01979c362e490a0b66c3b062e516ce5e6df054c

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