summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-08-14 14:05:15 +0200
committerGitHub <noreply@github.com>2017-08-14 14:05:15 +0200
commit079aa085416f76b4d19fbaaaad1c05e2ea508ba9 (patch)
treeb5a170e00317dfdfb92ec4022513e99ab3604978
parent1f3882bf237bb9560302241bc93f7edd89a365f0 (diff)
parentba277843ea99b4bb25df628d30f111798ff33f05 (diff)
Merge pull request #3089 from vespa-engine/balder/flip-visit-defaults-for-visiting
Flip defaults to optimize for streaming search by default.
-rw-r--r--searchcore/src/vespa/searchcore/config/proton.def22
-rw-r--r--searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.h1
3 files changed, 18 insertions, 11 deletions
diff --git a/searchcore/src/vespa/searchcore/config/proton.def b/searchcore/src/vespa/searchcore/config/proton.def
index 0c4160640eb..ac17efcab3f 100644
--- a/searchcore/src/vespa/searchcore/config/proton.def
+++ b/searchcore/src/vespa/searchcore/config/proton.def
@@ -202,7 +202,7 @@ summary.cache.maxbytes long default=0 restart
## Include visits in the cache, if the visitoperation allows it.
## This will enable another separate cache of summary.cache.maxbytes size.
-summary.cache.allowvisitcaching bool default=false restart
+summary.cache.allowvisitcaching bool default=true restart
## Control number of cache entries preallocated.
## Default is no preallocation
@@ -213,20 +213,26 @@ summary.cache.initialentries long default=0 restart
summary.cache.compression.type enum {NONE, LZ4, ZSTD} default=LZ4 restart
## Control compression level of the summary while in cache.
+## LZ4 has normal range 1..9 while ZSTD has range 1..19
+## 9 is a reasonable default for both
summary.cache.compression.level int default=9 restart
## Control compression type of the summary while in memory during compaction
## NB So far only stragey=LOG honours it.
-summary.log.compact.compression.type enum {NONE, LZ4, ZSTD} default=LZ4 restart
+summary.log.compact.compression.type enum {NONE, LZ4, ZSTD} default=ZSTD restart
## Control compression level of the summary while in memory during compaction
+## LZ4 has normal range 1..9 while ZSTD has range 1..19
+## 9 is a reasonable default for both
summary.log.compact.compression.level int default=9 restart
## Control compression type of the summary
-## NB So far only stragey=LOG honours it.
-summary.log.chunk.compression.type enum {NONE, LZ4, ZSTD} default=LZ4 restart
+summary.log.chunk.compression.type enum {NONE, LZ4, ZSTD} default=ZSTD restart
## Control compression level of the summary
+## LZ4 has normal range 1..9 while ZSTD has range 1..19
+## 9 is a reasonable default for both. Going above for ZSTD can give an improvement,
+## but is better done in conjunction with increasing chunk size.
summary.log.chunk.compression.level int default=9 restart
## Max size in bytes per chunk.
@@ -366,12 +372,12 @@ maxvisibilitydelay double default=1.0
## You can set this to a number above zero for visit to shortcut expensive serialize size computation.
## This value will be provided instead.
## negative number will compute it accurately.
-## Default will be flipped shortly. (Once image personal index has gone live.)
-visit.defaultserializedsize long default=-1
+## This is only used for weakly consistent visiting, like streaming search.
+visit.defaultserializedsize long default=1
## This will ignore the maxbytes limit advised from above.
-## default will be flipped shortly. (Once image personal index has gone live.)
-visit.ignoremaxbytes bool default=false
+## This is only used for weakly consistent visiting, like streaming search.
+visit.ignoremaxbytes bool default=true
## Number of initializer threads used for loading structures from disk at proton startup.
## The threads are shared between document databases when value is larger than 0.
diff --git a/searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.cpp b/searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.cpp
index 5050864e25c..8260c0209a9 100644
--- a/searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.cpp
+++ b/searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.cpp
@@ -80,10 +80,10 @@ DocumentIterator::DocumentIterator(const storage::spi::Bucket &bucket,
_selection(selection),
_versions(versions),
_fields(fields.clone()),
- _defaultSerializedSize(defaultSerializedSize),
+ _defaultSerializedSize((readConsistency == ReadConsistency::WEAK) ? defaultSerializedSize : -1),
_readConsistency(readConsistency),
_metaOnly(fields.getType() == document::FieldSet::NONE),
- _ignoreMaxBytes(ignoreMaxBytes),
+ _ignoreMaxBytes((readConsistency == ReadConsistency::WEAK) && ignoreMaxBytes),
_fetchedData(false),
_sources(),
_nextItem(0),
@@ -277,7 +277,7 @@ DocumentIterator::fetchCompleteSource(const IDocumentRetriever & source, Iterate
}
} else {
MatchVisitor visitor(matcher, metaData, lidIndexMap, _fields.get(), list, _defaultSerializedSize);
- visitor.allowVisitCaching(_readConsistency == ReadConsistency::WEAK);
+ visitor.allowVisitCaching(isWeakRead());
source.visitDocuments(lidsToFetch, visitor, _readConsistency);
}
diff --git a/searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.h b/searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.h
index 1ceee910d91..2b2679a12ee 100644
--- a/searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.h
+++ b/searchcore/src/vespa/searchcore/proton/persistenceengine/document_iterator.h
@@ -36,6 +36,7 @@ private:
bool checkDoc(const document::Document &doc) const;
bool checkDoc(const SelectContext &sc) const;
void fetchCompleteSource(const IDocumentRetriever & source, storage::spi::IterateResult::List & list);
+ bool isWeakRead() const { return _readConsistency == ReadConsistency::WEAK; }
public:
DocumentIterator(const storage::spi::Bucket &bucket,