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

Ensure consistent validations in `all_collection_stats.js` by eventually comparing $collStats and $_internalAllCollectionStats

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0, 7.0.13, 6.0.17, 8.0.0-rc15
    • Affects Version/s: 6.0.3, 7.0.0, 8.0.0-rc0, 7.3.3
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • v8.0, v7.3, v7.0, v6.0
    • CAR Team 2024-07-22, CAR Team 2024-08-05
    • 0

      The "all_collection_stats.js" test verifies the correct behavior of $_internalAllCollectionStats by comparing each collection with $collStats statistics. However, there is a race condition because these two aggregations are issued at different points in time. There is a chance that WT checkpoints between those aggregations and may causes the statistics to differ (e.g., storageSize).

      I propose updating the test to enhance its robustness. It should be sufficient to validate $_internalAllCollectionStats by ensuring that it eventually provides the same statistics as $collStats, perhaps using an `assert.soon`.

            Assignee:
            fanny.mariaaranda@mongodb.com Fanny Maria Aranda (Inactive)
            Reporter:
            fanny.mariaaranda@mongodb.com Fanny Maria Aranda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: