diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2024-03-05 14:36:07 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2024-03-05 14:36:07 +0000 |
commit | 45123e5612b6942b0f4ba6586be250d2069529e8 (patch) | |
tree | 7fca0cdda35c77aef67e56ff9ac423d9989af1e3 /streamingvisitors | |
parent | b706db42b706a16993b0c62531b329bc45862ce1 (diff) |
Rename to reflect that is is a configid, not a search cluster.
Diffstat (limited to 'streamingvisitors')
-rw-r--r-- | streamingvisitors/src/vespa/searchvisitor/searchenvironment.cpp | 22 | ||||
-rw-r--r-- | streamingvisitors/src/vespa/searchvisitor/searchenvironment.h | 4 |
2 files changed, 13 insertions, 13 deletions
diff --git a/streamingvisitors/src/vespa/searchvisitor/searchenvironment.cpp b/streamingvisitors/src/vespa/searchvisitor/searchenvironment.cpp index 933aa528163..fdaa05ab005 100644 --- a/streamingvisitors/src/vespa/searchvisitor/searchenvironment.cpp +++ b/streamingvisitors/src/vespa/searchvisitor/searchenvironment.cpp @@ -124,27 +124,27 @@ SearchEnvironment::~SearchEnvironment() } SearchEnvironment::Env & -SearchEnvironment::getEnv(const vespalib::string & searchCluster) +SearchEnvironment::getEnv(const vespalib::string & config_id) { - config::ConfigUri searchClusterUri(_configUri.createWithNewId(searchCluster)); + config::ConfigUri configUri(_configUri.createWithNewId(config_id)); if (_localEnvMap == nullptr) { EnvMapUP envMap = std::make_unique<EnvMap>(); _localEnvMap = envMap.get(); std::lock_guard guard(_lock); _threadLocals.emplace_back(std::move(envMap)); } - auto localFound = _localEnvMap->find(searchCluster); + auto localFound = _localEnvMap->find(config_id); if (localFound == _localEnvMap->end()) { std::lock_guard guard(_lock); - auto found = _envMap.find(searchCluster); + auto found = _envMap.find(config_id); if (found == _envMap.end()) { - LOG(debug, "Init VSMAdapter with config id = '%s'", searchCluster.c_str()); - Env::SP env = std::make_shared<Env>(searchClusterUri, *_wordFolder, _transport, _file_distributor_connection_spec); - _envMap[searchCluster] = std::move(env); - found = _envMap.find(searchCluster); + LOG(debug, "Init VSMAdapter with config id = '%s'", config_id.c_str()); + Env::SP env = std::make_shared<Env>(configUri, *_wordFolder, _transport, _file_distributor_connection_spec); + _envMap[config_id] = std::move(env); + found = _envMap.find(config_id); } _localEnvMap->insert(*found); - localFound = _localEnvMap->find(searchCluster); + localFound = _localEnvMap->find(config_id); } return *localFound->second; } @@ -156,9 +156,9 @@ SearchEnvironment::clear_thread_local_env_map() } std::shared_ptr<const SearchEnvironmentSnapshot> -SearchEnvironment::get_snapshot(const vespalib::string& search_cluster) +SearchEnvironment::get_snapshot(const vespalib::string& config_id) { - return getEnv(search_cluster).get_snapshot(); + return getEnv(config_id).get_snapshot(); } std::optional<int64_t> diff --git a/streamingvisitors/src/vespa/searchvisitor/searchenvironment.h b/streamingvisitors/src/vespa/searchvisitor/searchenvironment.h index 9ea4867272e..4cdc38a286b 100644 --- a/streamingvisitors/src/vespa/searchvisitor/searchenvironment.h +++ b/streamingvisitors/src/vespa/searchvisitor/searchenvironment.h @@ -75,12 +75,12 @@ private: FNET_Transport* const _transport; vespalib::string _file_distributor_connection_spec; - Env & getEnv(const vespalib::string & searchcluster); + Env & getEnv(const vespalib::string & config_id); public: SearchEnvironment(const config::ConfigUri & configUri, FNET_Transport* transport, const vespalib::string& file_distributor_connection_spec); ~SearchEnvironment(); - std::shared_ptr<const SearchEnvironmentSnapshot> get_snapshot(const vespalib::string& search_cluster); + std::shared_ptr<const SearchEnvironmentSnapshot> get_snapshot(const vespalib::string& config_id); std::optional<int64_t> get_oldest_config_generation(); // Should only be used by unit tests to simulate that the calling thread is finished. void clear_thread_local_env_map(); |