diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-11-17 16:39:51 -0500 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-11-20 15:01:11 -0500 |
commit | c98068d7c836e2d36a862189733d903b24b02d9a (patch) | |
tree | 6d072ccacc3853e47a848e1fdf57d40196964bda /src/mongo/db/s/session_catalog_migration_source.h | |
parent | 697db2c561f006cb9e1be9312e72c5072dd12530 (diff) | |
download | mongo-c98068d7c836e2d36a862189733d903b24b02d9a.tar.gz |
SERVER-32027 Fix unit-tests which rely on having a valid wallclock time
Diffstat (limited to 'src/mongo/db/s/session_catalog_migration_source.h')
-rw-r--r-- | src/mongo/db/s/session_catalog_migration_source.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mongo/db/s/session_catalog_migration_source.h b/src/mongo/db/s/session_catalog_migration_source.h index 2e5faf393c2..75d7a0073f1 100644 --- a/src/mongo/db/s/session_catalog_migration_source.h +++ b/src/mongo/db/s/session_catalog_migration_source.h @@ -83,9 +83,7 @@ public: bool shouldWaitForMajority = false; }; - explicit SessionCatalogMigrationSource(NamespaceString ns); - - void init(OperationContext* opCtx); + SessionCatalogMigrationSource(OperationContext* opCtx, NamespaceString ns); /** * Returns true if there are more oplog entries to fetch at this moment. Note that new writes @@ -190,14 +188,16 @@ private: */ repl::OplogEntry _getLastFetchedNewWriteOplog(); + // Namespace for which the migration is happening const NamespaceString _ns; - // Protects _alreadyInitialized, _sessionCatalogCursor, _sessionOplogIterators - // _currentOplogIterator, _lastFetchedOplogBuffer, _lastFetchedOplog - stdx::mutex _sessionCloneMutex; - bool _alreadyInitialized = false; + // The rollback id just before migration started. This value is needed so that step-down + // followed by step-up situations can be discovered. + const int _rollbackIdAtInit; - int _rollbackIdAtInit = 0; + // Protects _sessionCatalogCursor, _sessionOplogIterators, _currentOplogIterator, + // _lastFetchedOplogBuffer, _lastFetchedOplog + stdx::mutex _sessionCloneMutex; // List of remaining session records that needs to be cloned. std::vector<std::unique_ptr<SessionOplogIterator>> _sessionOplogIterators; |