diff options
author | Henning Baldersheim <balder@oath.com> | 2018-02-07 11:38:30 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@oath.com> | 2018-02-07 11:38:30 +0100 |
commit | 3e3c3d24e5a799fd7ebfee9f5e3562cca549b755 (patch) | |
tree | 6f0c13d3269edcf1584223535f12da645b89689d /searchcore | |
parent | 989588a8f3de37dc51a3a376388ca24cdcda3c81 (diff) |
Protect against accessing structures not initialized yet.
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/server/documentdb.cpp | 7 |
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); |