Logical initial sync does not clone viewless timeseries collections

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: 8.2.0-rc0
    • Component/s: Catalog, Replication
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • Hide

      Run with: buildscripts/resmoke.py run --suite=no_passthrough --mongodSetParameters '{ featureFlagCreateViewlessTimeseriesCollections: 1 }' repro.js

      import {ReplSetTest} from "jstests/libs/replsettest.js";
      
      const rst = new ReplSetTest({
          nodes: [{}, {rsConfig: {priority: 0}}],  // No elections
      });
      rst.startSet();
      rst.initiate();
      
      const primary = rst.getPrimary();
      const db = primary.getDB("test");
      
      assert.commandWorked(db.createCollection("before"));
      assert.commandWorked(db.createCollection("myts", {timeseries: {timeField: "time"}}));
      assert.commandWorked(db.createCollection("after!"));
      
      let secondary = rst.restart(1, {startClean: true});
      rst.awaitSecondaryNodes(null, [secondary]);
      
      print("Collections on primary:" + tojsononeline(primary.getDB("test").getCollectionNames()));
      print("Collections on secondary:" + tojsononeline(secondary.getDB("test").getCollectionNames()));
      
      rst.stopSet();
      
      Show
      Run with: buildscripts/resmoke.py run --suite=no_passthrough --mongodSetParameters '{ featureFlagCreateViewlessTimeseriesCollections: 1 }' repro.js import {ReplSetTest} from "jstests/libs/replsettest.js"; const rst = new ReplSetTest({ nodes: [{}, {rsConfig: {priority: 0}}], // No elections }); rst.startSet(); rst.initiate(); const primary = rst.getPrimary(); const db = primary.getDB("test"); assert.commandWorked(db.createCollection("before")); assert.commandWorked(db.createCollection("myts", {timeseries: {timeField: "time"}})); assert.commandWorked(db.createCollection("after!")); let secondary = rst.restart(1, {startClean: true}); rst.awaitSecondaryNodes(null, [secondary]); print("Collections on primary:" + tojsononeline(primary.getDB("test").getCollectionNames())); print("Collections on secondary:" + tojsononeline(secondary.getDB("test").getCollectionNames())); rst.stopSet();
    • CAR Team 2025-07-21, CAR Team 2025-08-04, CAR Team 2025-08-18
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 0

      Logical initial sync does not clone viewless timeseries collections through the database cloner. This happens because the cloner filters the listCollections output by type: 'collection'.

       

      We should adapt the cloner so that it will also clone viewless timeseries collections.

              Assignee:
              Joan Bruguera Micó
              Reporter:
              Joan Bruguera Micó
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: