diff options
author | Jason Chan <jason.chan@mongodb.com> | 2021-03-05 02:12:01 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-03-09 21:38:36 +0000 |
commit | 0c35e28c0d58d9119a1529218631410edd97aa7d (patch) | |
tree | 15b40cee62e733d1d796f15b8383ab771de91ccd /src/mongo/db/repl/tenant_oplog_applier.cpp | |
parent | 82df46317a5e23256fdc613dd10a4a11f85e8648 (diff) | |
download | mongo-0c35e28c0d58d9119a1529218631410edd97aa7d.tar.gz |
SERVER-53946 Resume batching from the last noop entry even if it is less than the startApplyingDonorOpTime
Diffstat (limited to 'src/mongo/db/repl/tenant_oplog_applier.cpp')
-rw-r--r-- | src/mongo/db/repl/tenant_oplog_applier.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mongo/db/repl/tenant_oplog_applier.cpp b/src/mongo/db/repl/tenant_oplog_applier.cpp index 0170a8bdac8..a4251de3a32 100644 --- a/src/mongo/db/repl/tenant_oplog_applier.cpp +++ b/src/mongo/db/repl/tenant_oplog_applier.cpp @@ -67,7 +67,7 @@ TenantOplogApplier::TenantOplogApplier(const UUID& migrationUuid, RandomAccessOplogBuffer* oplogBuffer, std::shared_ptr<executor::TaskExecutor> executor, ThreadPool* writerPool, - const bool isResuming) + Timestamp resumeBatchingTs) : AbstractAsyncComponent(executor.get(), std::string("TenantOplogApplier_") + tenantId), _migrationUuid(migrationUuid), _tenantId(tenantId), @@ -75,7 +75,7 @@ TenantOplogApplier::TenantOplogApplier(const UUID& migrationUuid, _oplogBuffer(oplogBuffer), _executor(std::move(executor)), _writerPool(writerPool), - _isResuming(isResuming) {} + _resumeBatchingTs(resumeBatchingTs) {} TenantOplogApplier::~TenantOplogApplier() { shutdown(); @@ -105,13 +105,13 @@ OpTime TenantOplogApplier::getBeginApplyingOpTime_forTest() const { return _beginApplyingAfterOpTime; } +Timestamp TenantOplogApplier::getResumeBatchingTs_forTest() const { + return _resumeBatchingTs; +} + Status TenantOplogApplier::_doStartup_inlock() noexcept { - Timestamp resumeTs; - if (_isResuming) { - resumeTs = _beginApplyingAfterOpTime.getTimestamp(); - } _oplogBatcher = - std::make_shared<TenantOplogBatcher>(_tenantId, _oplogBuffer, _executor, resumeTs); + std::make_shared<TenantOplogBatcher>(_tenantId, _oplogBuffer, _executor, _resumeBatchingTs); auto status = _oplogBatcher->startup(); if (!status.isOK()) return status; |