summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-10-06 09:47:35 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-10-06 09:47:35 +0200
commit9e89f2e7112038c921292d530fa49e85233495bb (patch)
tree1ff1f6a9ad14ca137d4f94e02798b73ddeadb66a /searchcore
parentcff7c32a82aed29a35dd30de65f39ce2ec0a19ad (diff)
No longer use maxdiskbloatfactor in proton.summary. Use equivalent from proton.flush.memory instead.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp19
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.h8
2 files changed, 13 insertions, 14 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp
index 8be4bc4510f..c7d87bbabce 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp
@@ -160,14 +160,16 @@ getStoreConfig(const ProtonConfig::Summary::Cache & cache)
}
LogDocumentStore::Config
-deriveConfig(const ProtonConfig::Summary & summary) {
+deriveConfig(const ProtonConfig::Summary & summary, const ProtonConfig::Flush::Memory & flush) {
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).setMaxDiskBloatFactor(log.maxdiskbloatfactor)
+ logConfig.setMaxFileSize(log.maxfilesize)
+ .setMaxDiskBloatFactor(std::min(flush.diskbloatfactor, flush.each.diskbloatfactor))
.setMaxBucketSpread(log.maxbucketspread).setMinFileSizeFactor(log.minfilesizefactor)
.setNumThreads(log.numthreads).compact2ActiveFile(log.compact2activefile)
.compactCompression(deriveCompression(log.compact.compression)).setFileConfig(fileConfig)
@@ -176,7 +178,7 @@ deriveConfig(const ProtonConfig::Summary & summary) {
}
search::LogDocumentStore::Config buildStoreConfig(const ProtonConfig & proton) {
- return deriveConfig(proton.summary);
+ return deriveConfig(proton.summary, proton.flush.memory);
}
using AttributesConfigSP = DocumentDBConfig::AttributesConfigSP;
@@ -224,10 +226,10 @@ DocumentDBConfigManager::update(const ConfigSnapshot &snapshot)
MaintenanceConfigSP newMaintenanceConfig;
if (!_ignoreForwardedConfig) {
- if (_bootstrapConfig->getDocumenttypesConfigSP().get() == NULL ||
- _bootstrapConfig->getDocumentTypeRepoSP().get() == NULL ||
- _bootstrapConfig->getProtonConfigSP().get() == NULL ||
- _bootstrapConfig->getTuneFileDocumentDBSP().get() == NULL) {
+ if (!(_bootstrapConfig->getDocumenttypesConfigSP() &&
+ _bootstrapConfig->getDocumentTypeRepoSP() &&
+ _bootstrapConfig->getProtonConfigSP() &&
+ _bootstrapConfig->getTuneFileDocumentDBSP())) {
return;
}
}
@@ -344,8 +346,7 @@ DocumentDBConfigManager::update(const ConfigSnapshot &snapshot)
DocumentDBConfigManager::
-DocumentDBConfigManager(const vespalib::string &configId,
- const vespalib::string &docTypeName)
+DocumentDBConfigManager(const vespalib::string &configId, const vespalib::string &docTypeName)
: _configId(configId),
_docTypeName(docTypeName),
_bootstrapConfig(),
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.h b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.h
index 45259fe32a3..171a96dff7c 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.h
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.h
@@ -34,8 +34,7 @@ private:
const DocumentDBConfig::IndexschemaConfig & newIndexschemaConfig);
public:
- DocumentDBConfigManager(const vespalib::string &configId,
- const vespalib::string &docTypeName);
+ DocumentDBConfigManager(const vespalib::string &configId, const vespalib::string &docTypeName);
~DocumentDBConfigManager();
void update(const config::ConfigSnapshot & snapshot);
@@ -54,9 +53,8 @@ public:
class DocumentDBConfigHelper
{
public:
- DocumentDBConfigHelper(const config::DirSpec &spec,
- const vespalib::string &docTypeName,
- const config::ConfigKeySet &extraConfigKeys = config::ConfigKeySet());
+ DocumentDBConfigHelper(const config::DirSpec &spec, const vespalib::string &docTypeName,
+ const config::ConfigKeySet &extraConfigKeys);
~DocumentDBConfigHelper();
bool nextGeneration(int timeoutInMillis);