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

In config POC chunk operation commit failed

    • Fully Compatible
    • Sharding 2022-05-02, Sharding NYC 2022-05-16
    • 4

      Test to reproduce: jstests/sharding/basic_merge.js

      Error:

      [js_test:basic_merge] uncaught exception: Error: command failed: {
      [js_test:basic_merge] 	"ok" : 0,
      [js_test:basic_merge] 	"errmsg" : "split failed :: caused by :: chunk operation commit failed: version 1|4||6254b0f1d311c6da72e1ba13||Timestamp(1649717489, 70) doesn't exist in namespace: db.foo. Unable to save chunk ops. Command: { applyOps: [ { op: \"u\", b: true, ns: \"config.chunks\", o: { _id: ObjectId('6254b0f1d311c6da72e1ba1b'), uuid: UUID(\"137d8911-23da-4732-9e3e-0ec842182688\"), min: { a: MinKey }, max: { a: -1.0 }, shard: \"basic_merge-rs0\", lastmod: Timestamp(1, 3), history: [ { validAfter: Timestamp(1649717489, 70), shard: \"basic_merge-rs0\" } ] }, o2: { _id: ObjectId('6254b0f1d311c6da72e1ba1b') } }, { op: \"u\", b: true, ns: \"config.chunks\", o: { _id: ObjectId('6254b0f1d311c6da72e1ba40'), uuid: UUID(\"137d8911-23da-4732-9e3e-0ec842182688\"), min: { a: -1.0 }, max: { a: MaxKey }, shard: \"basic_merge-rs0\", lastmod: Timestamp(1, 4), history: [ { validAfter: Timestamp(1649717489, 70), shard: \"basic_merge-rs0\" } ] }, o2: { _id: ObjectId('6254b0f1d311c6da72e1ba40') } } ], preCondition: [ { ns: \"config.chunks\", q: { query: { min: { a: MinKey }, max: { a: MaxKey }, uuid: UUID(\"137d8911-23da-4732-9e3e-0ec842182688\") }, orderby: { lastmod: -1 } }, res: { uuid: UUID(\"137d8911-23da-4732-9e3e-0ec842182688\"), shard: \"basic_merge-rs0\" } } ], writeConcern: { w: 1, wtimeout: 0 } }. Result: { got: {}, whatFailed: { ns: \"config.chunks\", q: { query: { min: { a: MinKey }, max: { a: MaxKey }, uuid: UUID(\"137d8911-23da-4732-9e3e-0ec842182688\") }, orderby: { lastmod: -1 } }, res: { uuid: UUID(\"137d8911-23da-4732-9e3e-0ec842182688\"), shard: \"basic_merge-rs0\" } }, ok: 0.0, errmsg: \"preCondition failed\", code: 2, codeName: \"BadValue\", $replData: { term: 1, lastOpCommitted: { ts: Timestamp(1649717489, 85), t: 1 }, lastCommittedWall: new Date(1649717489636), lastOpVisible: { ts: Timestamp(1649717489, 87), t: 1 }, configVersion: 1, configTerm: 1, replicaSetId: ObjectId('6254b0ecd311c6da72e1b8e0'), syncSourceIndex: -1, isPrimary: true }, $gleStats: { lastOpTime: { ts: Timestamp(1649717489, 87), t: 1 }, electionId: ObjectId('7fffffff0000000000000001') }, lastCommittedOpTime: Timestamp(1649717489, 85), $clusterTime: { clusterTime: Timestamp(1649717489, 87), signature: { hash: BinData(0, 0000000000000000000000000000000000000000), keyId: 0 } }, $configTime: Timestamp(1649717489, 85), $topologyTime: Timestamp(1649717489, 12), operationTime: Timestamp(1649717489, 87) } :: caused by :: preCondition failed",
      [js_test:basic_merge] 	"code" : 2,
      [js_test:basic_merge] 	"codeName" : "BadValue",
      [js_test:basic_merge] 	"$clusterTime" : {
      [js_test:basic_merge] 		"clusterTime" : Timestamp(1649717489, 87),
      [js_test:basic_merge] 		"signature" : {
      [js_test:basic_merge] 			"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
      [js_test:basic_merge] 			"keyId" : NumberLong(0)
      [js_test:basic_merge] 		}
      [js_test:basic_merge] 	},
      [js_test:basic_merge] 	"operationTime" : Timestamp(1649717489, 87)
      [js_test:basic_merge] } with original command request: {
      [js_test:basic_merge] 	"split" : "db.foo",
      [js_test:basic_merge] 	"middle" : {
      [js_test:basic_merge] 		"a" : -1
      [js_test:basic_merge] 	},
      [js_test:basic_merge] 	"lsid" : {
      [js_test:basic_merge] 		"id" : UUID("255368f3-b62a-46e1-9005-b5430309d9a2")
      [js_test:basic_merge] 	},
      [js_test:basic_merge] 	"$clusterTime" : {
      [js_test:basic_merge] 		"clusterTime" : Timestamp(1649717489, 87),
      [js_test:basic_merge] 		"signature" : {
      [js_test:basic_merge] 			"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
      [js_test:basic_merge] 			"keyId" : NumberLong(0)
      [js_test:basic_merge] 		}
      [js_test:basic_merge] 	}
      [js_test:basic_merge] } on connection: connection to ip-10-122-2-167:20022 :
      [js_test:basic_merge] _getErrorWithCode@src/mongo/shell/utils.js:24:13
      [js_test:basic_merge] doassert@src/mongo/shell/assert.js:18:14
      [js_test:basic_merge] _assertCommandWorked@src/mongo/shell/assert.js:759:25
      [js_test:basic_merge] assert.commandWorked@src/mongo/shell/assert.js:851:16
      [js_test:basic_merge] @jstests/sharding/basic_merge.js:38:8
      [js_test:basic_merge] @jstests/sharding/basic_merge.js:67:3
      [js_test:basic_merge] failed to load: jstests/sharding/basic_merge.js
      
      

            Assignee:
            kshitij.gupta@mongodb.com Kshitij Gupta
            Reporter:
            andrew.shuvalov@mongodb.com Andrew Shuvalov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: