[SERVER-17300] Balancer tries to create config.tags index multiple times Created: 17/Feb/15  Updated: 25/Jan/17  Resolved: 27/Feb/15

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 2.6.13, 3.0.1, 3.1.0

Type: Bug Priority: Major - P3
Reporter: Kevin Pulo Assignee: Randolph Tan
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-16638 remove fsync messages from config ser... Closed
is related to SERVER-17151 Avoid fsync command in ConfigCoordinator Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Steps To Reproduce:

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.

Participants:

 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.



 Comments   
Comment by Githook User [ 05/Apr/16 ]

Author:

{u'username': u'devkev', u'name': u'Kevin Pulo', u'email': u'kevin.pulo@mongodb.com'}

Message: SERVER-17300 Balancer tries to create config.tags index multiple times

Conflicts:
src/mongo/s/config.cpp

Cherry-picked from e75edbf8b668a7b2a48c8d495769ebaf83e91bba
The conflicts were just two #includes which aren't in s/config.cpp on v2.6
Branch: v2.6
https://github.com/mongodb/mongo/commit/7f81284a7851207226ef52ee55c8ded23fc693c6

Comment by Githook User [ 04/Mar/15 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-17300 Balancer tries to create config.tags index multiple times

(cherry picked from commit e75edbf8b668a7b2a48c8d495769ebaf83e91bba)
Branch: v3.0
https://github.com/mongodb/mongo/commit/286bb637c6056074ae6f84d21c4e4b779d15b1a8

Comment by Githook User [ 27/Feb/15 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-17300 Balancer tries to create config.tags index multiple times
Branch: master
https://github.com/mongodb/mongo/commit/e75edbf8b668a7b2a48c8d495769ebaf83e91bba

Generated at Thu Feb 08 03:43:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.