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

Support timeseries views without a buckets collection when validating consistency between listCollections and $listCatalog in tests

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: 8.1.0-rc0
    • Component/s: Catalog
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • Hide
      import {
          assertCatalogListOperationsConsistencyForCollection
      } from "jstests/libs/catalog_list_operations_consistency_validator.js";
      
      const conn = MongoRunner.runMongod();
      const db = conn.getDB("test");
      assert.commandWorked(db.createView("orphants", "system.buckets.orphants", []));
      assertCatalogListOperationsConsistencyForCollection(db.orphants);
      
      MongoRunner.stopMongod(conn);
      
      Show
      import { assertCatalogListOperationsConsistencyForCollection } from "jstests/libs/catalog_list_operations_consistency_validator.js"; const conn = MongoRunner.runMongod(); const db = conn.getDB("test"); assert.commandWorked(db.createView("orphants", "system.buckets.orphants", [])); assertCatalogListOperationsConsistencyForCollection(db.orphants); MongoRunner.stopMongod(conn);
    • CAR Team 2024-12-23
    • 200

      SERVER-90768 introduced a test hook which checks the consistency between the output of listCollections and $listCatalog. Since for time series collections, listCollections returns the options from the buckets collection as the options of the main (view) namespace, the consistency checker also does a similar lookup of the buckets collection.

      This implementation assumed that if the main (view) namespace of the time series collection existed, then the corresponding buckets collection would always exists. This assumption is incorrect, and certain concurrent operations, such as create and drop, can generate this scenario. As this is a known issue without a trivial solution, tolerate this scenario in the validator, which is consistent with the solution adopted in other scenarios (e.g. listCollections).

            Assignee:
            joan.bruguera-mico@mongodb.com Joan Bruguera Micó
            Reporter:
            joan.bruguera-mico@mongodb.com Joan Bruguera Micó
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: