summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/migration_chunk_cloner_source_legacy.h
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2017-10-03 16:44:56 -0400
committerRandolph Tan <randolph@10gen.com>2017-10-07 20:09:35 -0400
commit155db509a8e376211095cec062f7aa5be1b7707e (patch)
tree9ef6f0130061db25fad109ab275c982eab79af5a /src/mongo/db/s/migration_chunk_cloner_source_legacy.h
parent3d42a318626e059b2669356bb5d39056b8fa1b76 (diff)
downloadmongo-155db509a8e376211095cec062f7aa5be1b7707e.tar.gz
SERVER-31030 Make sure that _getNextSessionMods will only contain oplog entries that are majority committed
Diffstat (limited to 'src/mongo/db/s/migration_chunk_cloner_source_legacy.h')
-rw-r--r--src/mongo/db/s/migration_chunk_cloner_source_legacy.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mongo/db/s/migration_chunk_cloner_source_legacy.h b/src/mongo/db/s/migration_chunk_cloner_source_legacy.h
index 5bd20b0907d..5bf180bcea7 100644
--- a/src/mongo/db/s/migration_chunk_cloner_source_legacy.h
+++ b/src/mongo/db/s/migration_chunk_cloner_source_legacy.h
@@ -35,6 +35,7 @@
#include "mongo/client/connection_string.h"
#include "mongo/db/namespace_string.h"
#include "mongo/db/query/plan_executor.h"
+#include "mongo/db/repl/optime.h"
#include "mongo/db/s/migration_chunk_cloner_source.h"
#include "mongo/db/s/migration_session_id.h"
#include "mongo/db/s/session_catalog_migration_source.h"
@@ -130,7 +131,13 @@ public:
*/
Status nextModsBatch(OperationContext* opCtx, Database* db, BSONObjBuilder* builder);
- void nextSessionMigrationBatch(OperationContext* opCtx, BSONArrayBuilder* arrBuilder);
+ /**
+ * Appends to the buffer oplogs that contain session information for this migration.
+ * If this function returns a valid OpTime, this means that the oplog appended are
+ * not guaranteed to be majority committed and the caller has to use wait for the
+ * returned opTime to be majority committed.
+ */
+ repl::OpTime nextSessionMigrationBatch(OperationContext* opCtx, BSONArrayBuilder* arrBuilder);
private:
friend class DeleteNotificationStage;