Logical initial sync does not clone viewless timeseries collections

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: 8.2.0-rc0
    • Component/s: None
    • None
    • Catalog and Routing
    • 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();
    • None
    • 3
    • TBD
    • 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:
            Unassigned
            Reporter:
            Joan Bruguera Micó
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: