diff options
author | Tor Egge <Tor.Egge@yahoo-inc.com> | 2017-04-27 11:35:43 +0000 |
---|---|---|
committer | Tor Egge <Tor.Egge@yahoo-inc.com> | 2017-04-27 11:35:43 +0000 |
commit | bf37857692d69c5efb4f2c5376f97f5895ced727 (patch) | |
tree | 8d67d38275568ec47c22f9b28a964aace4f0e814 /searchcore | |
parent | 13ce3e2b2ed8783784dc3ce34c95875724c9dcef (diff) |
Rejected config => delayed (attribute aspects in) config.
Diffstat (limited to 'searchcore')
8 files changed, 32 insertions, 32 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/ddbstate.cpp b/searchcore/src/vespa/searchcore/proton/server/ddbstate.cpp index 9b9a06fc2e2..4b14fae358b 100644 --- a/searchcore/src/vespa/searchcore/proton/server/ddbstate.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/ddbstate.cpp @@ -156,7 +156,7 @@ DDBState::setConfigState(ConfigState newConfigState) void -DDBState::clearRejectedConfig() +DDBState::clearDelayedConfig() { setConfigState(ConfigState::OK); } diff --git a/searchcore/src/vespa/searchcore/proton/server/ddbstate.h b/searchcore/src/vespa/searchcore/proton/server/ddbstate.h index eff49c2b1d1..8c8bf0bd162 100644 --- a/searchcore/src/vespa/searchcore/proton/server/ddbstate.h +++ b/searchcore/src/vespa/searchcore/proton/server/ddbstate.h @@ -117,20 +117,20 @@ public: } static bool - getRejectedConfig(ConfigState state) + getDelayedConfig(ConfigState state) { return state != ConfigState::OK; } bool - getRejectedConfig() const + getDelayedConfig() const { ConfigState state(_configState); - return getRejectedConfig(state); + return getDelayedConfig(state); } void - clearRejectedConfig(); + clearDelayedConfig(); ConfigState getConfigState() const diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp index e4227997bf6..307707b7c6a 100644 --- a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp @@ -482,11 +482,11 @@ DocumentDB::applyConfig(DocumentDBConfig::SP configSnapshot, setIndexSchema(*configSnapshot, serialNum); } if (!configSnapshot->getDelayedAttributeAspects()) { - if (_state.getRejectedConfig()) { + if (_state.getDelayedConfig()) { LOG(info, "DocumentDB(%s): Stopped delaying attribute aspect changes", _docTypeName.toString().c_str()); } - _state.clearRejectedConfig(); + _state.clearDelayedConfig(); } setActiveConfig(configSnapshot, serialNum, generation); if (params.shouldMaintenanceControllerChange()) { @@ -819,7 +819,7 @@ void DocumentDB::reconfigure(const DocumentDBConfig::SP & snapshot) { masterExecute([this, snapshot]() { newConfigSnapshot(snapshot); }); - // Wait for config to be applied or rejected, or for document db close + // Wait for config to be applied, or for document db close std::unique_lock<std::mutex> guard(_configMutex); while ((_activeConfigSnapshotGeneration < snapshot->getGeneration()) && !_state.getClosed()) { @@ -895,9 +895,9 @@ DocumentDB::reportStatus() const return StatusReport::create(params.state(StatusReport::PARTIAL). progress(progress). message(msg)); - } else if (_state.getRejectedConfig()) { + } else if (_state.getDelayedConfig()) { return StatusReport::create(params.state(StatusReport::PARTIAL). - message("DocumentDB rejecting config")); + message("DocumentDB delaying attribute aspects changes in config")); } else { return StatusReport::create(params.state(StatusReport::UPOK)); } @@ -1350,7 +1350,7 @@ DocumentDB::updateLegacyMetrics(LegacyDocumentDBMetrics &metrics) updateLidSpaceMetrics(metrics.notReady.docMetaStore, dmss.notreadydms->get()); updateLidSpaceMetrics(metrics.removed.docMetaStore, dmss.remdms->get()); - metrics.numBadConfigs.set(_state.getRejectedConfig() ? 1u : 0u); + metrics.numBadConfigs.set(_state.getDelayedConfig() ? 1u : 0u); } void diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdb.h b/searchcore/src/vespa/searchcore/proton/server/documentdb.h index 0c08ed1d082..da933faeeb0 100644 --- a/searchcore/src/vespa/searchcore/proton/server/documentdb.h +++ b/searchcore/src/vespa/searchcore/proton/server/documentdb.h @@ -397,7 +397,7 @@ public: void retain() { _refCount.retain(); } void release() { _refCount.release(); } - bool getRejectedConfig() const { return _state.getRejectedConfig(); } + bool getDelayedConfig() const { return _state.getDelayedConfig(); } /** * Implements IReplayConfig API. diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.cpp b/searchcore/src/vespa/searchcore/proton/server/proton.cpp index 0246684d9d7..ae9aa130b72 100644 --- a/searchcore/src/vespa/searchcore/proton/server/proton.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/proton.cpp @@ -552,13 +552,13 @@ size_t Proton::getNumActiveDocs() const vespalib::string -Proton::getBadConfigs(void) const +Proton::getDelayedConfigs(void) const { std::ostringstream res; bool first = true; std::shared_lock<std::shared_timed_mutex> guard(_mutex); for (const auto &kv : _documentDBMap) { - if (kv.second->getRejectedConfig()) { + if (kv.second->getDelayedConfig()) { if (!first) { res << ", "; } @@ -895,8 +895,8 @@ Proton::getComponentConfig(Consumer &consumer) vespalib::string name("proton.documentdb."); name.append(docDb->getDocTypeName().getName()); int64_t gen = docDb->getActiveGeneration(); - if (docDb->getRejectedConfig()) { - consumer.add(Config(name, gen, "has rejected config")); + if (docDb->getDelayedConfig()) { + consumer.add(Config(name, gen, "has delayed attribute aspect change in config")); } else { consumer.add(Config(name, gen)); } diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.h b/searchcore/src/vespa/searchcore/proton/server/proton.h index 3f4546d7e9f..68f6f4efc6a 100644 --- a/searchcore/src/vespa/searchcore/proton/server/proton.h +++ b/searchcore/src/vespa/searchcore/proton/server/proton.h @@ -243,7 +243,7 @@ public: size_t getNumActiveDocs() const; DocsumBySlime & getDocsumBySlime() { return *_docsumBySlime; } - vespalib::string getBadConfigs(void) const; + vespalib::string getDelayedConfigs(void) const; virtual StatusReport::List getStatusReports() const override; diff --git a/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.cpp b/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.cpp index d38ca2dd72a..58c2fd90625 100644 --- a/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.cpp @@ -65,10 +65,10 @@ RPCHooksBase::reportState(Session & session, FRT_RPCRequest * req) { std::vector<Pair> res; int64_t numDocs(_proton.getNumDocs()); - std::string badConfigs = _proton.getBadConfigs(); + std::string delayedConfigs = _proton.getDelayedConfigs(); bool numDocsChanged = session.getNumDocs() != numDocs; - bool badConfigsChanged = session.getBadConfigs() != badConfigs; - bool changed = numDocsChanged || badConfigsChanged; + bool delayedConfigsChanged = session.getDelayedConfigs() != delayedConfigs; + bool changed = numDocsChanged || delayedConfigsChanged; if (_proton.getMatchEngine().isOnline()) { res.push_back(Pair("online", "true")); @@ -78,20 +78,20 @@ RPCHooksBase::reportState(Session & session, FRT_RPCRequest * req) res.push_back(Pair("onlineState", "onlineSoon")); } if (session.getGen() < 0) { - if (badConfigsChanged) - res.push_back(Pair("badConfigs", badConfigs)); + if (delayedConfigsChanged) + res.push_back(Pair("delayedConfigs", delayedConfigs)); res.push_back(Pair("onlineDocs", make_string("%lu", numDocs))); session.setGen(0); } else if (changed) { - if (badConfigsChanged) - res.push_back(Pair("badConfigs", badConfigs)); + if (delayedConfigsChanged) + res.push_back(Pair("delayedConfigs", delayedConfigs)); res.push_back(Pair("onlineDocs", make_string("%lu", numDocs))); session.setGen(session.getGen() + 1); } if (numDocsChanged) session.setNumDocs(numDocs); - if (badConfigsChanged) - session.setBadConfigs(badConfigs); + if (delayedConfigsChanged) + session.setDelayedConfigs(delayedConfigs); FRT_Values &ret = *req->GetReturn(); FRT_StringValue *k = ret.AddStringArray(res.size()); @@ -112,7 +112,7 @@ RPCHooksBase::reportState(Session & session, FRT_RPCRequest * req) RPCHooksBase::Session::Session() : _createTime(fastos::ClockSystem::now()), _numDocs(0u), - _badConfigs(), + _delayedConfigs(), _gen(-1), _down(false) { diff --git a/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.h b/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.h index 02060fd6490..ba0ddaea310 100644 --- a/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.h +++ b/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.h @@ -25,7 +25,7 @@ private: private: fastos::TimeStamp _createTime; int64_t _numDocs; - vespalib::string _badConfigs; + vespalib::string _delayedConfigs; int64_t _gen; bool _down; public: @@ -40,12 +40,12 @@ private: bool getDown(void) const { return _down; } void setDown(void) { _down = true; } - const vespalib::string & getBadConfigs(void) const { - return _badConfigs; + const vespalib::string & getDelayedConfigs(void) const { + return _delayedConfigs; } - void setBadConfigs(const vespalib::string &badConfigs) { - _badConfigs = badConfigs; + void setDelayedConfigs(const vespalib::string &delayedConfigs) { + _delayedConfigs = delayedConfigs; } }; |