replication slaves and stale config data

13 views
Skip to first unread message

Leif Walsh

unread,
May 7, 2013, 3:20:56 PM5/7/13
to mongo...@googlegroups.com
A primary mongod will reject a query inside handlePossibleShardedMessage() by first checking shardingState.enabled() (https://github.com/mongodb/mongo/blob/master/src/mongo/s/d_logic.h#L252).  If it's not enabled, the version check, shardVersionOk, is not performed.

In ReplSetImpl::relinquish(), the last thing we do is call shardingState.resetShardingState(), which clears out shardingState, and most notably, turns off shardingState.enabled().

If I'm not missing something, then if a mongos queries a secondary with a stale version of the config, the secondary has no way to know that and respond accordingly.  If I am missing something, could someone please explain it to me?

-- 
Cheers,
Leif
Reply all
Reply to author
Forward
0 new messages