diff options
5 files changed, 4 insertions, 21 deletions
diff --git a/searchcore/src/vespa/searchcore/config/proton.def b/searchcore/src/vespa/searchcore/config/proton.def index 2888a3999a6..8e5236c7254 100644 --- a/searchcore/src/vespa/searchcore/config/proton.def +++ b/searchcore/src/vespa/searchcore/config/proton.def @@ -254,10 +254,6 @@ summary.log.chunk.maxbytes int default=65536 ## Skip crc32 check on read. summary.log.chunk.skipcrconread bool default=false -## Control how compaction is done, write to the front or to new const file. -## TODO: Remove, will always be false -summary.log.compact2activefile bool default=false - ## Max size per summary file. summary.log.maxfilesize long default=1000000000 @@ -285,10 +281,6 @@ summary.read.mmap.options[] enum {MLOCK, POPULATE, HUGETLB} restart ## Advise to give to os when mapping memory. summary.read.mmap.advise enum {NORMAL, RANDOM, SEQUENTIAL} default=NORMAL restart -## Enable compact for bucket oriented access. -## TODO: Unused, always bucket order. -summary.compact2buckets bool default=true restart - ## The name of the input document type documentdb[].inputdoctypename string ## The configid used to subscribe to config for this database. diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp index 0429ccb4a61..1d1bbf21d70 100644 --- a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp @@ -193,7 +193,7 @@ deriveConfig(const ProtonConfig::Summary & summary, const ProtonConfig::Flush::M logConfig.setMaxFileSize(log.maxfilesize) .setMaxDiskBloatFactor(std::min(flush.diskbloatfactor, flush.each.diskbloatfactor)) .setMaxBucketSpread(log.maxbucketspread).setMinFileSizeFactor(log.minfilesizefactor) - .compact2ActiveFile(log.compact2activefile).compactCompression(deriveCompression(log.compact.compression)) + .compactCompression(deriveCompression(log.compact.compression)) .setFileConfig(fileConfig).disableCrcOnRead(chunk.skipcrconread); return LogDocumentStore::Config(config, logConfig); } diff --git a/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp b/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp index eb49a556bdc..9e75a85d289 100644 --- a/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp +++ b/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp @@ -206,7 +206,7 @@ TEST("testGrowing") { LogDataStore::Config config; //(100000, 0.1, 3.0, 0.2, 8, true, CompressionConfig::LZ4, // WriteableFileChunk::Config(CompressionConfig(CompressionConfig::LZ4, 9, 60), 1000)); config.setMaxFileSize(100000).setMaxDiskBloatFactor(0.1).setMaxBucketSpread(3.0).setMinFileSizeFactor(0.2) - .compact2ActiveFile(true).compactCompression({CompressionConfig::LZ4}) + .compactCompression({CompressionConfig::LZ4}) .setFileConfig({{CompressionConfig::LZ4, 9, 60}, 1000}); vespalib::ThreadStackExecutor executor(8, 128*1024); DummyFileHeaderContext fileHeaderContext; @@ -1054,7 +1054,6 @@ TEST("require that config equality operator detects inequality") { EXPECT_FALSE(C() == C().setMinFileSizeFactor(0.3)); EXPECT_FALSE(C() == C().setFileConfig(WriteableFileChunk::Config({}, 70))); EXPECT_FALSE(C() == C().disableCrcOnRead(true)); - EXPECT_FALSE(C() == C().compact2ActiveFile(false)); EXPECT_FALSE(C() == C().compactCompression({CompressionConfig::ZSTD})); } diff --git a/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp b/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp index 148d77738f9..590764bf469 100644 --- a/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp +++ b/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp @@ -35,7 +35,6 @@ LogDataStore::Config::Config() _maxBucketSpread(2.5), _minFileSizeFactor(0.2), _skipCrcOnRead(false), - _compact2ActiveFile(true), _compactCompression(CompressionConfig::LZ4), _fileConfig() { } @@ -46,7 +45,6 @@ LogDataStore::Config::operator == (const Config & rhs) const { (_maxDiskBloatFactor == rhs._maxDiskBloatFactor) && (_maxFileSize == rhs._maxFileSize) && (_minFileSizeFactor == rhs._minFileSizeFactor) && - (_compact2ActiveFile == rhs._compact2ActiveFile) && (_skipCrcOnRead == rhs._skipCrcOnRead) && (_compactCompression == rhs._compactCompression) && (_fileConfig == rhs._fileConfig); @@ -449,8 +447,7 @@ void LogDataStore::flushActiveAndWait(SerialNum syncToken) { } bool LogDataStore::shouldCompactToActiveFile(size_t compactedSize) const { - return _config.compact2ActiveFile() - || (_config.getMinFileSizeFactor() * _config.getMaxFileSize() > compactedSize); + return (_config.getMinFileSizeFactor() * _config.getMaxFileSize() > compactedSize); } void LogDataStore::setNewFileChunk(const LockGuard & guard, FileChunk::UP file) @@ -748,9 +745,7 @@ LogDataStore::verifyModificationTime(const NameIdSet & partList) if ( ! FastOS_File::Stat(idxName.c_str(), &idxStat)) { throw runtime_error(make_string("Failed to Stat '%s'\nDirectory =\n%s", idxName.c_str(), ls(partList).c_str())); } - ns_log::Logger::LogLevel logLevel = _config.compact2ActiveFile() - ? ns_log::Logger::warning - : ns_log::Logger::debug; + ns_log::Logger::LogLevel logLevel = ns_log::Logger::debug; if ((datStat._modifiedTimeNS < prevDatStat._modifiedTimeNS) && hasNonHeaderData(datName)) { VLOG(logLevel, "Older file '%s' is newer (%ld) than file '%s' (%ld)\nDirectory =\n%s", prevDatNam.c_str(), prevDatStat._modifiedTimeNS, diff --git a/searchlib/src/vespa/searchlib/docstore/logdatastore.h b/searchlib/src/vespa/searchlib/docstore/logdatastore.h index 52d78cac2bd..91143ecd1d2 100644 --- a/searchlib/src/vespa/searchlib/docstore/logdatastore.h +++ b/searchlib/src/vespa/searchlib/docstore/logdatastore.h @@ -52,12 +52,10 @@ public: double getMinFileSizeFactor() const { return _minFileSizeFactor; } bool crcOnReadDisabled() const { return _skipCrcOnRead; } - bool compact2ActiveFile() const { return _compact2ActiveFile; } const CompressionConfig & compactCompression() const { return _compactCompression; } const WriteableFileChunk::Config & getFileConfig() const { return _fileConfig; } Config & disableCrcOnRead(bool v) { _skipCrcOnRead = v; return *this;} - Config & compact2ActiveFile(bool v) { _compact2ActiveFile = v; return *this; } bool operator == (const Config &) const; private: @@ -66,7 +64,6 @@ public: double _maxBucketSpread; double _minFileSizeFactor; bool _skipCrcOnRead; - bool _compact2ActiveFile; CompressionConfig _compactCompression; WriteableFileChunk::Config _fileConfig; }; |