diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-12-05 13:43:52 -0500 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2018-11-14 09:47:52 -0500 |
commit | dcf7e0dd89d34f58b592f1adb3d41e5edd6e2012 (patch) | |
tree | 36664490ee71eb77ddf183dcd5c642b3e732f179 /src/mongo/db/s/migration_source_manager.h | |
parent | c2cc425b9d2b23eead06ecbfd996375e47c81baa (diff) | |
download | mongo-dcf7e0dd89d34f58b592f1adb3d41e5edd6e2012.tar.gz |
SERVER-32198 Split CollectionShardingState::getMetadata into three methods
o getCurrentMetadataIfKnown - which returns the current filtering
metadata if any is available
o getMetadataForOperation - which returns the metadata which is required
by the current opertion, based on the OperationShardingState
o getCurrentMetadata - which returns the currently available filtering
metadata (or UNSHARDED if not known)
This is in preparation for making
getMetadataForOperation/getCurrentMetadata throw
StaleShardVersion exception if the metadata has not been loaded yet.
Diffstat (limited to 'src/mongo/db/s/migration_source_manager.h')
-rw-r--r-- | src/mongo/db/s/migration_source_manager.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/db/s/migration_source_manager.h b/src/mongo/db/s/migration_source_manager.h index c053b73736e..eaaacdf0590 100644 --- a/src/mongo/db/s/migration_source_manager.h +++ b/src/mongo/db/s/migration_source_manager.h @@ -185,6 +185,8 @@ private: // comments explaining the various state transitions. enum State { kCreated, kCloning, kCloneCaughtUp, kCriticalSection, kCloneCompleted, kDone }; + ScopedCollectionMetadata _getCurrentMetadataAndCheckEpoch(OperationContext* opCtx); + /** * If this donation moves the first chunk to the recipient (i.e., the recipient didn't have any * chunks), this function writes a no-op message to the oplog, so that change stream will notice |