Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-43757

background validate must skip indexes whose persisted and in-memory idents do not match

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.1
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Fully Compatible
    • Execution Team 2019-10-07

      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).

            Assignee:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: