summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-08-09 12:03:50 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2021-08-09 12:03:50 +0000
commit60f6f1883e764d06c0d6996985ace97458dbc1de (patch)
tree9bd0a15ca8819ddcab24ee067d5ad1c127c61290 /searchcore
parent882c73fcee723fafa322ceaea1da580e0a21e549 (diff)
Add some debug logging.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/memory_flush_config_updater.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/memoryflush.cpp12
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/memoryflush.h1
3 files changed, 15 insertions, 2 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/memory_flush_config_updater.cpp b/searchcore/src/vespa/searchcore/proton/server/memory_flush_config_updater.cpp
index b842820bfe1..8f9bc4b4aeb 100644
--- a/searchcore/src/vespa/searchcore/proton/server/memory_flush_config_updater.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/memory_flush_config_updater.cpp
@@ -78,11 +78,11 @@ MemoryFlushConfigUpdater::updateFlushStrategy(const LockGuard &guard, const char
if ( currentConfig != newConfig ) {
_flushStrategy->setConfig(newConfig);
LOG(info, "Due to %s (conservative-disk=%d, conservative-memory=%d, retired=%d) flush config updated to "
- "global-disk-bloat(%1.2f), max-tls-size(%" PRIu64 "),"
- "max-global-memory(%" PRIu64 "), max-memory-gain(%" PRIu64 ")",
+ "global-disk-bloat(%1.2f), max-tls-size(%" PRIu64 "),max-global-memory(%" PRIu64 "), max-memory-gain(%" PRIu64 ")",
why, _useConservativeDiskMode, _useConservativeMemoryMode, _nodeRetired,
newConfig.globalDiskBloatFactor, newConfig.maxGlobalTlsSize,
newConfig.maxGlobalMemory, newConfig.maxMemoryGain);
+ LOG(debug, "Old config = %s\nNew config = %s", currentConfig.toString().c_str(), newConfig.toString().c_str());
}
}
diff --git a/searchcore/src/vespa/searchcore/proton/server/memoryflush.cpp b/searchcore/src/vespa/searchcore/proton/server/memoryflush.cpp
index a3f27aa7a92..8baa06e2bb6 100644
--- a/searchcore/src/vespa/searchcore/proton/server/memoryflush.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/memoryflush.cpp
@@ -74,6 +74,18 @@ MemoryFlush::Config::Config(uint64_t maxGlobalMemory_in,
maxTimeGain(maxTimeGain_in)
{ }
+vespalib::string
+MemoryFlush::Config::toString() const {
+ vespalib::asciistream os;
+ os << "maxGlobalMemory=" << maxGlobalMemory << " ";
+ os << "maxGlobalTlsSize=" << maxGlobalTlsSize << " ";
+ os << "globalDiskBloatFactor=" << globalDiskBloatFactor << " ";
+ os << "maxMemoryGain=" << maxMemoryGain << " ";
+ os << "diskBloatFactor=" << diskBloatFactor << " ";
+ os << "maxTimeGain(ns)=" << maxTimeGain.count();
+ return os.str();
+}
+
MemoryFlush::MemoryFlush(const Config &config, vespalib::system_time startTime)
: _lock(),
_config(config),
diff --git a/searchcore/src/vespa/searchcore/proton/server/memoryflush.h b/searchcore/src/vespa/searchcore/proton/server/memoryflush.h
index 1e8d1b1f08c..3ea34c10e52 100644
--- a/searchcore/src/vespa/searchcore/proton/server/memoryflush.h
+++ b/searchcore/src/vespa/searchcore/proton/server/memoryflush.h
@@ -44,6 +44,7 @@ public:
(maxTimeGain == rhs.maxTimeGain) &&
(diskBloatFactor == rhs. diskBloatFactor);
}
+ vespalib::string toString() const;
};
enum OrderType { DEFAULT, MAXAGE, DISKBLOAT, TLSSIZE, MEMORY };