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

Balancer tries to create config.tags index multiple times

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.6.13, 3.0.1, 3.1.0
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • Hide
      var st = new ShardingTest({shards:2,mongos:1})
      st.s.adminCommand({enableSharding: "test"})
      for(i = 0; i < 100; i++) st.s.adminCommand({shardCollection: "test." + i.toString(), key: { _id: 1}})
      

      then watch 100 messages like this

       m30000| 2015-02-19T14:44:50.194+1100 [conn9] CMD fsync: sync:1 lock:0
      

      flow past every 5-6 seconds, each at most a few millis apart.

      Show
      var st = new ShardingTest({shards:2,mongos:1}) st.s.adminCommand({enableSharding: "test" }) for (i = 0; i < 100; i++) st.s.adminCommand({shardCollection: "test." + i.toString(), key: { _id: 1}}) then watch 100 messages like this m30000| 2015-02-19T14:44:50.194+1100 [conn9] CMD fsync: sync:1 lock:0 flow past every 5-6 seconds, each at most a few millis apart.

      Currently the balancer ensures the { ns: 1, min: 1 } index on the config.tags collection many times each balancer round — once per sharded collection.

      Each time this happens, the config servers are first fsync'd, which is expensive and causes a high volume of fsync messages in the config server logs (e.g. as observed on SERVER-16638).

      The solution is to move lines 428 – 438 of s/balance.cpp to be before the start of the loop over sharded collections.

            Assignee:
            randolph@mongodb.com Randolph Tan
            Reporter:
            kevin.pulo@mongodb.com Kevin Pulo
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: