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

Chunk is not marked as jumbo when it should

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.4.0
    • Component/s: Sharding
    • None
    • ALL

      Sharded cluster with two shards.

      Sharded collection 'test.test4' on {my_flag:1}, and then wrote many many docs with the same my_flag value. Then split the range manually to make sure that the big chunk is the lowest. According to the changelog and to the config server logs, the balancer has tried to move the chunk and failed:

      3169:2016-12-08T15:01:06.681-0500 I SHARDING [Balancer] Performing a split because migration test.test4: [{ my_flag: MinKey }, { my_flag: 100.0 }), from rs1, to rs2 failed for size reasons :: caused by :: ChunkTooBig: Cannot move chunk: the maximum number of documents for a chunk is 133, the maximum chunk size is 67108864, average document size is 648943. Found 3001 documents in chunk  ns: test.test4 { my_flag: MinKey } -> { my_flag: 100.0 }
      3170-2016-12-08T15:01:06.700-0500 I SHARDING [Balancer] Marking chunk ns: test.test4, shard: rs1, lastmod: 1|1||5849b98b0d4c5ace47a95847, min: { my_flag: MinKey }, max: { my_flag: 100.0 } as jumbo.
      3171-2016-12-08T15:01:06.728-0500 I SHARDING [Balancer] about to log metadata event into actionlog: { _id: "AD-MAC10G.local-2016-12-08T15:01:06.728-0500-5849bc025079cb49a05d42aa", server: "AD-MAC10G.local", clientAddr: "", time: new Date(1481227266728), what: "balancer.round", ns: "", details: { executionTimeMillis: 296, errorOccured: false, candidateChunks: 1, chunksMoved: 1 } }
      

      However, the chunk is not marked as jumbo as per mongoS:

      mongos> db.chunks.find({ns:"test.test4"})
      { "_id" : "test.test4-my_flag_MinKey", "lastmod" : Timestamp(2, 1), "lastmodEpoch" : ObjectId("5849b98b0d4c5ace47a95847"), "ns" : "test.test4", "min" : { "my_flag" : { "$minKey" : 1 } }, "max" : { "my_flag" : 100 }, "shard" : "rs1" }
      { "_id" : "test.test4-my_flag_100.0", "lastmod" : Timestamp(2, 0), "lastmodEpoch" : ObjectId("5849b98b0d4c5ace47a95847"), "ns" : "test.test4", "min" : { "my_flag" : 100 }, "max" : { "my_flag" : 200 }, "shard" : "rs2" }
      { "_id" : "test.test4-my_flag_200.0", "lastmod" : Timestamp(1, 4), "lastmodEpoch" : ObjectId("5849b98b0d4c5ace47a95847"), "ns" : "test.test4", "min" : { "my_flag" : 200 }, "max" : { "my_flag" : { "$maxKey" : 1 } }, "shard" : "rs1" }
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            alex.komyagin@mongodb.com Alexander Komyagin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: