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

Prevent timeseries mixed-schema collMod from running in v5-v6 multiversion fuzzer suites

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.0.0
    • Affects Version/s: 6.0.0
    • Component/s: Catalog
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • Hide
      const rst = new ReplSetTest({nodes: [{binVersion: "latest"}, {binVersion: "5.0"}]});
      rst.startSet();
      rst.initiate();
      
      const db = rst.getPrimary().getDB("test");
      assert.commandWorked(db.createCollection("myts", {timeseries: {timeField: "t"}}));
      assert.commandWorked(
          db.runCommand({collMod: "myts", timeseriesBucketsMayHaveMixedSchemaData: true}));
      
      rst.stopSet();
      
      Show
      const rst = new ReplSetTest({nodes: [{binVersion: "latest" }, {binVersion: "5.0" }]}); rst.startSet(); rst.initiate(); const db = rst.getPrimary().getDB( "test" ); assert .commandWorked(db.createCollection( "myts" , {timeseries: {timeField: "t" }})); assert .commandWorked(     db.runCommand({collMod: "myts" , timeseriesBucketsMayHaveMixedSchemaData: true })); rst.stopSet();
    • CAR Team 2025-04-14
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      On a replica set containing a v6.0 binary primary and one or more v5.0 secondaries, running a collMod command with timeseriesBucketsMayHaveMixedSchemaData (as introduced in SERVER-91195), will create an inconsistency in the mixed-schema flag across replica set members as detected by CheckReplDBHash.

       

      This behavior is an intentional trade-off made by SERVER-91195 to introduce this backwards-compatible collMod option. The inconsistency is harmless, and not expected in practice as users should only run this command once all node binaries are upgraded.

       

      We should prevent this inconsistency from being created in the fuzzer tests, or ignore it when it happens.

            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:
              None
              None
              None
              None