summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@oath.com>2018-01-29 20:18:07 +0000
committerHenning Baldersheim <balder@oath.com>2018-01-29 20:18:07 +0000
commit1381913b3e329e8a7d10ed89df77192fd7071d37 (patch)
tree050380d8c29faa5230f94c6fd46fee7e26613dcd /searchcore
parentf6169d507a61fec1fea428c5e315dac4b4cf3398 (diff)
c++ll for loop and remove unused code.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/proton_config_fetcher.cpp20
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/proton_config_fetcher.h2
3 files changed, 3 insertions, 21 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp
index fe1ce77c5a9..def18b76360 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp
@@ -167,8 +167,6 @@ deriveConfig(const ProtonConfig::Summary & summary, const ProtonConfig::Flush::M
DocumentStore::Config config(getStoreConfig(summary.cache));
const ProtonConfig::Summary::Log & log(summary.log);
const ProtonConfig::Summary::Log::Chunk & chunk(log.chunk);
- const
-
WriteableFileChunk::Config fileConfig(deriveCompression(chunk.compression), chunk.maxbytes);
LogDataStore::Config logConfig;
logConfig.setMaxFileSize(log.maxfilesize)
diff --git a/searchcore/src/vespa/searchcore/proton/server/proton_config_fetcher.cpp b/searchcore/src/vespa/searchcore/proton/server/proton_config_fetcher.cpp
index adb52583a58..deeec695f26 100644
--- a/searchcore/src/vespa/searchcore/proton/server/proton_config_fetcher.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/proton_config_fetcher.cpp
@@ -6,7 +6,6 @@
#include "i_proton_configurer.h"
#include <vespa/config/common/exceptions.h>
#include <vespa/vespalib/util/exceptions.h>
-#include <thread>
#include <vespa/log/log.h>
LOG_SETUP(".proton.server.proton_config_fetcher");
@@ -80,11 +79,9 @@ void
ProtonConfigFetcher::updateDocumentDBConfigs(const BootstrapConfig::SP & bootstrapConfig, const ConfigSnapshot & snapshot)
{
lock_guard guard(_mutex);
- for (DBManagerMap::iterator it(_dbManagerMap.begin()), mt(_dbManagerMap.end());
- it != mt;
- it++) {
- it->second->forwardConfig(bootstrapConfig);
- it->second->update(snapshot);
+ for (auto & entry : _dbManagerMap) {
+ entry.second->forwardConfig(bootstrapConfig);
+ entry.second->update(snapshot);
}
}
@@ -181,17 +178,6 @@ ProtonConfigFetcher::close()
}
}
-DocumentDBConfig::SP
-ProtonConfigFetcher::getDocumentDBConfig(const DocTypeName & docTypeName) const
-{
- lock_guard guard(_mutex);
- DBManagerMap::const_iterator it(_dbManagerMap.find(docTypeName));
- if (it == _dbManagerMap.end())
- return DocumentDBConfig::SP();
-
- return it->second->getConfig();
-}
-
void
ProtonConfigFetcher::rememberDocumentTypeRepo(std::shared_ptr<document::DocumentTypeRepo> repo)
{
diff --git a/searchcore/src/vespa/searchcore/proton/server/proton_config_fetcher.h b/searchcore/src/vespa/searchcore/proton/server/proton_config_fetcher.h
index fa1f75ebe91..c8d1e55e4e4 100644
--- a/searchcore/src/vespa/searchcore/proton/server/proton_config_fetcher.h
+++ b/searchcore/src/vespa/searchcore/proton/server/proton_config_fetcher.h
@@ -44,8 +44,6 @@ public:
*/
void close();
- DocumentDBConfig::SP getDocumentDBConfig(const DocTypeName & docTypeName) const;
-
void Run(FastOS_ThreadInterface * thread, void *arg) override;
private: