summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@oath.com>2018-02-07 11:38:30 +0100
committerHenning Baldersheim <balder@oath.com>2018-02-07 11:38:30 +0100
commit3e3c3d24e5a799fd7ebfee9f5e3562cca549b755 (patch)
tree6f0c13d3269edcf1584223535f12da645b89689d /searchcore
parent989588a8f3de37dc51a3a376388ca24cdcda3c81 (diff)
Protect against accessing structures not initialized yet.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdb.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
index 2cc2517fe2a..1b2cc18708c 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
@@ -234,8 +234,7 @@ public:
}
};
-InitDoneTask::~InitDoneTask() {
-}
+InitDoneTask::~InitDoneTask() = default;
void
DocumentDB::initManagers()
@@ -1219,6 +1218,10 @@ updateLidSpaceMetrics(MetricSetType &metrics, const search::IDocumentMetaStore &
void
DocumentDB::updateMetrics(DocumentDBMetricsCollection &metrics)
{
+ if (_state.getState() < DDBState::State::REPLAY_TRANSACTION_LOG) {
+ return;
+ }
+
updateLegacyMetrics(metrics.getLegacyMetrics());
updateIndexMetrics(metrics, _subDBs.getReadySubDB()->getSearchableStats());
updateAttributeMetrics(metrics, _subDBs);