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

reshardCollection() on timeseries view ns returns unexpected CollectionUUIDMismatch field

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Storage Execution
    • ALL
    • Hide
      const mongo = new ShardingTest({shards: 2, rs: {nodes: 3}});
      const dbName = 'testDB';
      const tsViewName = 'tsView';
      const viewNss = `${dbName}.${tsViewName}`;
      assert.commandWorked(mongo.s0.adminCommand({enableSharding: dbName}));
      const db = mongo.s0.getDB(dbName);
      assert.commandWorked(
          db.createCollection(tsViewName, {timeseries: {timeField: "time", metaField: "meta"}}));
      assert.commandWorked(mongo.s0.adminCommand({
          shardCollection: viewNss,
          key: {"meta": 1},
      }));
      // Fails with CollectionUUIDMismatch 'expectedCollection': 'system.buckets.tsView'.
      assert.commandWorked(mongo.s0.adminCommand(
          {reshardCollection: viewNss, key: {"randField": 1}, collectionUUID: UUID()})); 
      Show
      const mongo = new ShardingTest({shards: 2, rs: {nodes: 3}}); const dbName = 'testDB' ; const tsViewName = 'tsView' ; const viewNss = `${dbName}.${tsViewName}`; assert .commandWorked(mongo.s0.adminCommand({enableSharding: dbName})); const db = mongo.s0.getDB(dbName); assert .commandWorked(     db.createCollection(tsViewName, {timeseries: {timeField: "time" , metaField: "meta" }})); assert .commandWorked(mongo.s0.adminCommand({     shardCollection: viewNss,     key: { "meta" : 1}, })); // Fails with CollectionUUIDMismatch 'expectedCollection' : 'system.buckets.tsView' . assert .commandWorked(mongo.s0.adminCommand(     {reshardCollection: viewNss, key: { "randField" : 1}, collectionUUID: UUID()}));

      reshardCollection() on a timeseries view name with an incorrect 'collectionUUID' is expected to return CollectionUUIDMismatch with 'expectedCollection': <timeseries view name> 

       

      Instead, the CollectionUUIDMismatch yields 'expectedCollection': <ts buckets collection>

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            haley.connelly@mongodb.com Haley Connelly
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: