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

Balancer tries to create config.tags index multiple times

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.6.13, 3.0.1, 3.1.0
    • Component/s: Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Completed:
    • Steps To Reproduce:
      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.

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: