aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-02-02 18:33:05 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2017-02-02 18:33:05 +0100
commit5c0e13b0bd89d403b0a603dd4fe6f676a8bc08b8 (patch)
treec3446277d587d3c1773410e7870832f5256d4b94
parenta229dd6d865c8652df65429c5682ce166bfb51f9 (diff)
Ignore maxentries.
-rw-r--r--build_settings.cmake2
-rw-r--r--searchcore/src/vespa/searchcore/config/proton.def5
-rw-r--r--searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp1
-rw-r--r--searchlib/src/vespa/searchlib/docstore/filechunk.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/docstore/filechunk.h3
-rw-r--r--searchlib/src/vespa/searchlib/docstore/logdatastore.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/docstore/logdatastore.h4
-rw-r--r--searchlib/src/vespa/searchlib/docstore/writeablefilechunk.cpp1
8 files changed, 6 insertions, 14 deletions
diff --git a/build_settings.cmake b/build_settings.cmake
index e73e2b3171f..6b0a14c7005 100644
--- a/build_settings.cmake
+++ b/build_settings.cmake
@@ -20,7 +20,7 @@ set(AUTORUN_UNIT_TESTS FALSE CACHE BOOL "If TRUE, tests will be run immediately
set(WARN_OPTS "-Wuninitialized -Werror -Wall -W -Wchar-subscripts -Wcomment -Wformat -Wparentheses -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings")
# C and C++ compiler flags
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O3 ${WARN_OPTS} -fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -DBOOST_DISABLE_ASSERTS -march=westmere -mtune=intel")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Og ${WARN_OPTS} -fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -DBOOST_DISABLE_ASSERTS -march=westmere -mtune=intel")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS} -Wnon-virtual-dtor -fvisibility-inlines-hidden -fdiagnostics-color=auto")
diff --git a/searchcore/src/vespa/searchcore/config/proton.def b/searchcore/src/vespa/searchcore/config/proton.def
index e59f9569da4..caf5dd92260 100644
--- a/searchcore/src/vespa/searchcore/config/proton.def
+++ b/searchcore/src/vespa/searchcore/config/proton.def
@@ -79,6 +79,7 @@ flush.memory.each.diskbloatfactor double default=0.2
flush.memory.maxage.time double default=86400.0
## Max diff in serial number allowed before that takes precedence.
+## TODO Deprecated and ignored. Remove soon.
flush.memory.maxage.serial long default=1000000
## When resource limit for memory is reached we choose a conservative mode for the flush strategy.
@@ -232,6 +233,7 @@ summary.log.chunk.compression.level int default=9 restart
summary.log.chunk.maxbytes int default=65536 restart
## Max number of documents in each chunk.
+## TODO Deprecated and ignored. Remove soon.
summary.log.chunk.maxentries int default=256 restart
## Skip crc32 check on read.
@@ -244,6 +246,7 @@ summary.log.compact2activefile bool default=false restart
summary.log.maxfilesize long default=1000000000 restart
## Max number of removes per summary file.
+## TODO Deprecated and ignored. Remove soon.
summary.log.maxentriesperfile long default=20000000 restart
## Max disk bloat factor. This will trigger compacting.
@@ -407,4 +410,4 @@ hwinfo.disk.samplewritesize long default = 1073741824
hwinfo.disk.slowwritespeedlimit double default = 100.0
## Adjustment to resource limit when determining if maintenance jobs can run.
-maintenancejobs.resourcelimitfactor double default = 1.05 \ No newline at end of file
+maintenancejobs.resourcelimitfactor double default = 1.05
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp
index 196a5081769..399811cc4b3 100644
--- a/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp
+++ b/searchcore/src/vespa/searchcore/proton/docsummary/summarymanager.cpp
@@ -148,7 +148,6 @@ SummaryManager::SummaryManager(vespalib::ThreadExecutor & executor,
log.minfilesizefactor, log.numthreads, log.compact2activefile,
deriveCompression(log.compact.compression), fileConfig);
logConfig.disableCrcOnRead(chunk.skipcrconread);
- logConfig.setMaxEntriesPerFile(log.maxentriesperfile);
_docStore.reset(new LogDocumentStore(executor, baseDir,
search::LogDocumentStore::Config(config, logConfig),
growStrategy, tuneFileSummary, fileHeaderContext, tlSyncer,
diff --git a/searchlib/src/vespa/searchlib/docstore/filechunk.cpp b/searchlib/src/vespa/searchlib/docstore/filechunk.cpp
index 1670a129e04..5ff8eff2b41 100644
--- a/searchlib/src/vespa/searchlib/docstore/filechunk.cpp
+++ b/searchlib/src/vespa/searchlib/docstore/filechunk.cpp
@@ -77,7 +77,6 @@ FileChunk::FileChunk(FileId fileId, NameId nameId, const vespalib::string & base
_nameId(nameId),
_name(nameId.createName(baseName)),
_skipCrcOnRead(skipCrcOnRead),
- _entriesCount(0),
_erasedCount(0),
_erasedBytes(0),
_diskFootprint(0),
@@ -238,7 +237,6 @@ FileChunk::updateLidMap(const LockGuard & guard, ISetLid & ds, uint64_t serialNu
globalBucketMap.recordLid(bucketId);
}
ds.setLid(guard, lidMeta.getLid(), LidInfo(getFileId().getId(), _chunkInfo.size(), lidMeta.size()));
- incEntries();
_addedBytes += adjustSize(lidMeta.size());
}
serialNum = chunkMeta.getLastSerial();
diff --git a/searchlib/src/vespa/searchlib/docstore/filechunk.h b/searchlib/src/vespa/searchlib/docstore/filechunk.h
index be5de8ca6cc..c7ba6eac024 100644
--- a/searchlib/src/vespa/searchlib/docstore/filechunk.h
+++ b/searchlib/src/vespa/searchlib/docstore/filechunk.h
@@ -214,7 +214,6 @@ public:
FileId getFileId() const { return _fileId; }
NameId getNameId() const { return _nameId; }
size_t getBloatCount() const { return _erasedCount; }
- size_t getEntriesCount() const { return _entriesCount; }
uint64_t getLastPersistedSerialNum() const;
virtual fastos::TimeStamp getModificationTime() const;
virtual bool frozen() const { return true; }
@@ -260,7 +259,6 @@ private:
const NameId _nameId;
const vespalib::string _name;
const bool _skipCrcOnRead;
- size_t _entriesCount;
size_t _erasedCount;
size_t _erasedBytes;
size_t _diskFootprint;
@@ -270,7 +268,6 @@ private:
File _file;
protected:
void setDiskFootprint(size_t sz) { _diskFootprint = sz; }
- void incEntries() { _entriesCount++; }
static size_t adjustSize(size_t sz);
class ChunkInfo
diff --git a/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp b/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp
index 69a65830f44..634b9437968 100644
--- a/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp
+++ b/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp
@@ -179,7 +179,7 @@ LogDataStore::requireSpace(LockGuard guard, WriteableFileChunk & active)
size_t oldSz(active.getDiskFootprint());
LOG(spam, "Checking file %s size %ld < %ld",
active.getName().c_str(), oldSz, _config.getMaxFileSize());
- if ((oldSz > _config.getMaxFileSize()) || (active.getEntriesCount() >= _config.getMaxEntriesPerFile())) {
+ if (oldSz > _config.getMaxFileSize()) {
FileId fileId = allocateFileId(guard);
setNewFileChunk(guard, createWritableFile(fileId, active.getSerialNum()));
setActive(guard, fileId);
diff --git a/searchlib/src/vespa/searchlib/docstore/logdatastore.h b/searchlib/src/vespa/searchlib/docstore/logdatastore.h
index 614d1103830..b2c155e190b 100644
--- a/searchlib/src/vespa/searchlib/docstore/logdatastore.h
+++ b/searchlib/src/vespa/searchlib/docstore/logdatastore.h
@@ -36,7 +36,6 @@ public:
public:
Config()
: _maxFileSize(1000000000ul),
- _maxEntriesPerFile(20000000),
_maxDiskBloatFactor(0.2),
_maxBucketSpread(2.5),
_minFileSizeFactor(0.2),
@@ -55,7 +54,6 @@ public:
const CompressionConfig & compactCompression,
const WriteableFileChunk::Config & fileConfig)
: _maxFileSize(maxFileSize),
- _maxEntriesPerFile(20000000),
_maxDiskBloatFactor(maxDiskBloatFactor),
_maxBucketSpread(maxBucketSpread),
_minFileSizeFactor(minFileSizeFactor),
@@ -70,8 +68,6 @@ public:
double getMaxDiskBloatFactor() const { return _maxDiskBloatFactor; }
double getMaxBucketSpread() const { return _maxBucketSpread; }
double getMinFileSizeFactor() const { return _minFileSizeFactor; }
- size_t getMaxEntriesPerFile() const { return _maxEntriesPerFile; }
- Config & setMaxEntriesPerFile(size_t v) { _maxEntriesPerFile = v; return *this; }
size_t getNumThreads() const { return _numThreads; }
bool crcOnReadDisabled() const { return _skipCrcOnRead; }
diff --git a/searchlib/src/vespa/searchlib/docstore/writeablefilechunk.cpp b/searchlib/src/vespa/searchlib/docstore/writeablefilechunk.cpp
index a774df021ce..839184760e4 100644
--- a/searchlib/src/vespa/searchlib/docstore/writeablefilechunk.cpp
+++ b/searchlib/src/vespa/searchlib/docstore/writeablefilechunk.cpp
@@ -706,7 +706,6 @@ WriteableFileChunk::append(uint64_t serialNum,
assert(serialNum >= _serialNum);
_serialNum = serialNum;
_addedBytes += adjustSize(len);
- incEntries();
size_t oldSz(_active->size());
LidMeta lm = _active->append(lid, buffer, len);
setDiskFootprint(FileChunk::getDiskFootprint() - oldSz + _active->size());