ExportXMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.1.0-rc0
    • Affects Version/s: None
    • Component/s: Catalog
    • None
    • Query Integration
    • Fully Compatible
    • QI 2025-02-17
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

        1. What this PR does

      Widens the error tolerance in the `MetricsFilteringInBackground` hook's helpers
      (`src/mongo/db/modules/atlas/jstests/disagg_storage/libs/metrics_filtering_background_helpers.js`).
      `isExpectedCollStatsAggregationError` becomes `isStaleNamespaceError` and now accepts
      `CommandNotSupportedOnView` alongside `NamespaceNotFound`, and it is wired into
      `validateCollStatsCmd` as well as `validateCollStatsAgg`.

        1. Motivation

      `getRandomCollection()` picks a namespace with `listCollections(

      {type: "collection"}

      )`, then runs a
      metrics command against it. Under `create_collection_and_view.js`, which deliberately recycles one
      namespace between a collection and a view, the namespace can flip inside that window and the metrics
      command fails with `CommandNotSupportedOnView`.

      Confirmed in the BF-45672 log: the workload flipped
      `test43_fsmdb0.create_collection_and_view_fsmcoll0` roughly every 3 ms, and the hook's `$collStats`
      aggregate landed on it ~3 ms after the pick. The server behavior is intended — `$collStats` runs
      against a view without expansion, so its `storageStats`/`count`/`queryExecStats` options hit the
      `kMustBeCollection` acquisition check in `shard_role.cpp:406`;
      `jstests/core/catalog/collstats/views_coll_stats.js` asserts exactly this.

            Assignee:
            Finley Lau
            Reporter:
            Finley Lau
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: