Printing record history in validation seems to potentially be traversing entire collection

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Engines, Storage Engines - Server Integration
    • Fully Compatible
    • Omnomlog - 2025-11-11, Meatball - 2025-11-25
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      SERVER-61203 started using the version cursor during validation. This behavior has been around since 5.0, and as of 7.0 it seems to be functioning correctly.

      However, while inspecting validation logs running the latest version of validation (8.3), I noticed that the size of the logs had exploded in size (validation results from running validate on 7.0.23 were 1MB; results from 8.3.0-alpha0-1569-g1c12fd6 were 276MB and 750MB).

      While inspecting the results of the log 6120300, which is supposed to iterate the version cursor of a given record, I noticed that it printed out 58,000 entries for a given recordID. The recordID was fixed in these logs, but the _id field was changing for each entry, and each entry looked like a completely different record. This is puzzling, since to my understanding inserting new documents would result in records with different recordIds, and updating the same document would preserve the _id field.

      I suspect that there's some issue here where the logic for printing out the version history of a record that we find an index inconsistency for is actually iterating through the entire recordStore and printing values for all records involved, which has had the consequence of exploding validation log sizes (see SERVER-113268)

            Assignee:
            Adeline Chen
            Reporter:
            Damian Wasilewicz
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: