summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-10-15 18:25:09 +0200
committerGitHub <noreply@github.com>2020-10-15 18:25:09 +0200
commit73c03faaeeaadf4f1a580efa1fc03768361ab1f4 (patch)
tree17138016fba55a5c67f1b15aa4f512bbb046d64c /searchcore
parent50e90c930da001bb9b75f59054de5f0c33e65cd5 (diff)
parent4714afbd2a1f0fa2a6774111de19b7fcc05e4e86 (diff)
Merge pull request #14905 from vespa-engine/toregge/make-tls-replay-progress-before-starting-replay
Make tls replay progress object before starting replay.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/transactionlogmanager.cpp8
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/transactionlogmanager.h9
3 files changed, 16 insertions, 4 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp b/searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp
index a52be734c13..3b1e64ea191 100644
--- a/searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp
@@ -468,7 +468,8 @@ FeedHandler::replayTransactionLog(SerialNum flushedIndexMgrSerial, SerialNum flu
TransactionLogManager::prepareReplay(_tlsMgr.getClient(), _docTypeName.getName(),
flushedIndexMgrSerial, flushedSummaryMgrSerial, config_store);
- _tlsReplayProgress = _tlsMgr.startReplay(_prunedSerialNum, _serialNum, *this);
+ _tlsReplayProgress = _tlsMgr.make_replay_progress(_prunedSerialNum, _serialNum);
+ _tlsMgr.startReplay(_prunedSerialNum, _serialNum, *this);
}
void
diff --git a/searchcore/src/vespa/searchcore/proton/server/transactionlogmanager.cpp b/searchcore/src/vespa/searchcore/proton/server/transactionlogmanager.cpp
index fdc9b6d7807..029e32d254e 100644
--- a/searchcore/src/vespa/searchcore/proton/server/transactionlogmanager.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/transactionlogmanager.cpp
@@ -112,8 +112,13 @@ TransactionLogManager::prepareReplay(TransLogClient &client,
}
}
+std::unique_ptr<TlsReplayProgress>
+TransactionLogManager::make_replay_progress(SerialNum first, SerialNum last)
+{
+ return std::make_unique<TlsReplayProgress>(getDomainName(), first, last);
+}
-TlsReplayProgress::UP
+void
TransactionLogManager::startReplay(SerialNum first,
SerialNum syncToken,
Callback &callback)
@@ -141,7 +146,6 @@ TransactionLogManager::startReplay(SerialNum first,
getDomainName().c_str(),
first, syncToken, getRpcTarget().c_str()));
}
- return std::make_unique<TlsReplayProgress>(getDomainName(), first, syncToken);
}
diff --git a/searchcore/src/vespa/searchcore/proton/server/transactionlogmanager.h b/searchcore/src/vespa/searchcore/proton/server/transactionlogmanager.h
index 32532e3f656..8ff9dad26a7 100644
--- a/searchcore/src/vespa/searchcore/proton/server/transactionlogmanager.h
+++ b/searchcore/src/vespa/searchcore/proton/server/transactionlogmanager.h
@@ -48,10 +48,17 @@ public:
SerialNum flushedSummaryMgrSerial,
ConfigStore &config_store);
+
+ /*
+ * Make a tls replay progress object for serial numbers (first..last]
+ */
+ std::unique_ptr<TlsReplayProgress>
+ make_replay_progress(SerialNum first, SerialNum last);
+
/**
* Start replay of the transaction log.
**/
- TlsReplayProgress::UP startReplay(SerialNum first, SerialNum syncToken, Callback &callback);
+ void startReplay(SerialNum first, SerialNum syncToken, Callback &callback);
/**
* Indicate that replay is done.