2 / 2
Dec 2024

Moving an empty chunk seems to be failing in version 8

[direct: mongos] test> sh.status() shardingVersion { _id: 1, clusterId: ObjectId('676183050a9357e7d5c24eef') } --- shards [ { _id: 'rs1', host: 'rs1/ip-172-31-30-2.eu-west-2.compute.internal:27018,ip-172-31-29-94.eu-west-2.compute.internal:27018,ip-172-31-30-31.eu-west-2.compute.internal:27018', state: 1, topologyTime: Timestamp({ t: 1734445880, i: 10 }), replSetConfigVersion: Long('-1') }, { _id: 'rs2', host: 'rs2/ip-172-31-22-238.eu-west-2.compute.internal:27018,ip-172-31-23-10.eu-west-2.compute.internal:27018,ip-172-31-25-45.eu-west-2.compute.internal:27018', state: 1, topologyTime: Timestamp({ t: 1734445904, i: 8 }), replSetConfigVersion: Long('-1') } ] --- active mongoses [ { '8.0.4': 1 } ] --- autosplit { 'Currently enabled': 'yes' } --- balancer { 'Currently enabled': 'yes', 'Currently running': 'no', 'Failed balancer rounds in last 5 attempts': 0, 'Migration Results for the last 24 hours': { '3': 'Success', '7': "Failed with error 'aborted', from rs1 to rs2" } } --- shardedDataDistribution [ { ns: 'config.system.sessions', shards: [ { shardName: 'rs1', numOrphanedDocs: 0, numOwnedDocuments: 36, ownedSizeBytes: 3564, orphanedSizeBytes: 0 } ] }, { ns: 'mydb.airflow', shards: [ { shardName: 'rs1', numOrphanedDocs: 0, numOwnedDocuments: 0, ownedSizeBytes: 0, orphanedSizeBytes: 0 } ] } ] --- databases [ { database: { _id: 'config', primary: 'config', partitioned: true }, collections: { 'config.system.sessions': { shardKey: { _id: 1 }, unique: false, balancing: true, chunkMetadata: [ { shard: 'rs1', nChunks: 1 } ], chunks: [ { min: { _id: MinKey() }, max: { _id: MaxKey() }, 'on shard': 'rs1', 'last modified': Timestamp({ t: 1, i: 0 }) } ], tags: [] } } }, { database: { _id: 'mydb', primary: 'rs2', version: { uuid: UUID('4beb4da9-d85b-4231-a9aa-4e8dc705fa23'), timestamp: Timestamp({ t: 1734447260, i: 3 }), lastMod: 1 } }, collections: { 'mydb.airflow': { shardKey: { a: 1, b: 1 }, unique: false, balancing: true, chunkMetadata: [ { shard: 'rs1', nChunks: 2 } ], chunks: [ { min: { a: MinKey(), b: MinKey() }, max: { a: 50000, b: 50000 }, 'on shard': 'rs1', 'last modified': Timestamp({ t: 2, i: 1 }) }, { min: { a: 50000, b: 50000 }, max: { a: MaxKey(), b: MaxKey() }, 'on shard': 'rs1', 'last modified': Timestamp({ t: 2, i: 2 }) } ], tags: [] } } } ] [direct: mongos] test> [direct: mongos] test> [direct: mongos] test> sh.moveChunk("mydb.airflow", {a: 50000, b: 50000}, "rs2") MongoServerError[OperationFailed]: Command request failed on source shard. :: caused by :: Data transfer error: migrate failed: ExceededTimeLimit: Migration failed because the orphans cleanup routine didn't clear yet a portion of the range being migrated that was previously owned by the recipient shard.