0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

SERVER-1849 Just to tie code site to the JIRA item

This commit is contained in:
Alberto Lerner 2010-11-19 15:43:13 -05:00
parent 5a49494a9c
commit 43003e0235

View File

@ -189,7 +189,9 @@ namespace mongo {
}
version = it->second;
// TODO SERVER-1849 pending drop work
// the manager should use the cached version only if the versions match exactly
ShardChunkManagerPtr p = _chunks[ns];
if ( p && p->getVersion() >= version ){
// our cached version is good, so just return
@ -202,8 +204,8 @@ namespace mongo {
const string c = (_configServer == _shardHost) ? "" /* local */ : _configServer;
ShardChunkManagerPtr p( new ShardChunkManager( c , ns , _shardName ) );
// TODO 11-18-2010 verify that the version in _versions is compatible with _checks[ns]
// Eventually, the version that will be authoritative is the ShardChunkManager's
// TODO SERVER-1849 verify that the manager's version is exactly the one requested
// If not, do update _chunks, but fail the request.
{
scoped_lock lk( _mutex );
_chunks[ns] = p;
@ -457,6 +459,10 @@ namespace mongo {
info->setVersion( ns , version );
shardingState.setVersion( ns , version );
// TODO SERVER-1849 pending drop work
// getShardChunkManager is assuming that the setVersion above were valid
// ideally, we'd call getShardChunkManager first, verify that 'version' is sound, and then update
// connection and global state
{
dbtemprelease unlock;
shardingState.getShardChunkManager( ns );