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

Failed to Presplit and create chunks in Sharded Cluster

    • Sharding EMEA
    • ALL
    • Sharding EMEA 2023-04-17

      Summary

      PreSplit and allocate the required chunks in a sharded cluster

      Motivation

      Who is the affected end user?

      Developers who are trying to work in the sharded cluster environment

      How does this affect the end user?

      The developers are currently blocked and are using the sharded cluster without pre splitting.

      How likely is it that this problem or use case will occur?

      It occurs frequently.

      If the problem does occur, what are the consequences and how severe are they?

      Not able to presplit and create chunks in sharded cluster

      Is this issue urgent?

      Yeah 

      Database name : chasetest

      Collection name: documents

       

      Steps:

       

      sh.disableBalancing("chasetest.documents")

      sh.startBalancer();

      sh.enableSharding("chasetest");

      sh.shardCollection('chasetest.documents', {'SHARD_KEY':1})

       

      for(x=0;x<840;x++) {

          print(`sh.splitAt("chasetest.documents", { "SHARD_KEY": ${x} })`)

          printjson(sh.splitAt("chasetest.documents", {"SHARD_KEY": x}))

      }  

       

       

       

      MongoError: split failed :: caused by :: chunk operation commit failed: version 4|3||637fee532a5d9628d64e06eb||Timestamp(1669328467, 4) doesn't exist in namespace: chasetest.documents. Unable to save chunk ops. Command: { applyOps: [ { op: "u", b: true, ns: "config.chunks", o: { _id: ObjectId('637fee87f998b1216f78a0ef'), uuid: UUID("61c91778-d277-44fe-bb42-f1ca936b7a14"), min:

      { SHARD_KEY: 18 }

      , max: { SHARD_KEY: 20 }, shard: "dev-65148-csi-gms-ingestion-api-dev-rs1", lastmod: Timestamp(4, 2), history: [ { validAfter: Timestamp(1669328467, 4), shard: "dev-65148-csi-gms-ingestion-api-dev-rs1" } ] }, o2: { _id: ObjectId('637fee87f998b1216f78a0ef') } }, { op: "u", b: true, ns: "config.chunks", o: { _id: ObjectId('637fee8df998b1216f78a180'), uuid: UUID("61c91778-d277-44fe-bb42-f1ca936b7a14"), min:

      { SHARD_KEY: 20 }

      , max: { SHARD_KEY: MaxKey }, shard: "dev-65148-csi-gms-ingestion-api-dev-rs1", lastmod: Timestamp(4, 3), history: [ { validAfter: Timestamp(1669328467, 4), shard: "dev-65148-csi-gms-ingestion-api-dev-rs1" } ] }, o2: { _id: ObjectId('637fee8df998b1216f78a180') } } ], preCondition: [ { ns: "config.chunks", q: { query: { min:

      { SHARD_KEY: 18 }

      , max: { SHARD_KEY: MaxKey }, uuid: UUID("61c91778-d277-44fe-bb42-f1ca936b7a14") }, orderby: { lastmod: -1 } }, res: { uuid: UUID("61c91778-d277-44fe-bb42-f1ca936b7a14"), shard: "dev-65148-csi-gms-ingestion-api-dev-rs1" } } ], writeConcern: { w: 1, wtimeout: 0 } }. Result: { got: {}, whatFailed: { ns: "config.chunks", q: { query: { min:

      { SHARD_KEY: 18 }

      , max: { SHARD_KEY: MaxKey }, uuid: UUID("61c91778-d277-44fe-bb42-f1ca936b7a14") }, orderby: { lastmod: -1 } }, res: { uuid: UUID("61c91778-d277-44fe-bb42-f1ca936b7a14"), shard: "dev-65148-csi-gms-ingestion-api-dev-rs1" } }, ok: 0.0, errmsg: "preCondition failed", code: 2, codeName: "BadValue", $gleStats: { lastOpTime:

      { ts: Timestamp(1669328525, 6), t: 4 }

      , electionId: ObjectId('7fffffff0000000000000004') }, lastCommittedOpTime: Timestamp(1669328525, 6), $clusterTime: { clusterTime: Timestamp(1669328525, 6), signature:

      { hash: BinData(0, 0000000000000000000000000000000000000000), keyId: 0 }

      }, $configTime: Timestamp(1669328525, 6), $topologyTime: Timestamp(1658235601, 4), operationTime: Timestamp(1669328525, 6) } :: caused by :: preCondition failed

       

        1. repro-server-71626.patch
          2 kB
          Jordi Serra Torrens

            Assignee:
            jordi.serra-torrens@mongodb.com Jordi Serra Torrens
            Reporter:
            rajesh.vinayagam@mongodb.com Rajesh Vinayagam
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: