aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2022-12-08 10:53:22 +0100
committerGitHub <[email protected]>2022-12-08 01:53:22 -0800
commite64451f535c71cdbf506352a7b20d3becd1bb557 (patch)
treeddaa78ecf41b72c4cf764c91bd08ce43bab0f170
parent0.2.0-pre1 (diff)
downloadzen-e64451f535c71cdbf506352a7b20d3becd1bb557.tar.xz
zen-e64451f535c71cdbf506352a7b20d3becd1bb557.zip
Fix logging of number of read entries from log/index file for stores (#204)
* Fix logging of number of read entries from log/index file for stores * changelog
-rw-r--r--CHANGELOG.md1
-rw-r--r--zenserver/cache/structuredcachestore.cpp9
-rw-r--r--zenstore/compactcas.cpp4
3 files changed, 7 insertions, 7 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 22f71bb56..47e97c7e3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,7 @@
- Bugfix: Zen `status` command now shows info about found Zen instances
- Bugfix: Zen `top` command now shows session id string
- Bugfix: On Windows platforms explicitly set the special `SO_EXCLUSIVEADDRUSE` flag as `SO_REUSEADDR` still allows shared use of sockets
+- Bugfix: Fix logging of number of entries read from caslog at startup
- Changed: Reduced GC `INFO` spam by converting to `DEBUG` log messages
- Changed: Use Iso8601 format for logging start and end message
diff --git a/zenserver/cache/structuredcachestore.cpp b/zenserver/cache/structuredcachestore.cpp
index 75f845cbf..ecb41d57e 100644
--- a/zenserver/cache/structuredcachestore.cpp
+++ b/zenserver/cache/structuredcachestore.cpp
@@ -649,7 +649,7 @@ ZenCacheDiskLayer::CacheBucket::OpenOrCreate(std::filesystem::path BucketDir, bo
void
ZenCacheDiskLayer::CacheBucket::MakeIndexSnapshot()
{
- ZEN_INFO("write store snapshot for '{}'", m_BucketDir / m_BucketName);
+ ZEN_DEBUG("write store snapshot for '{}'", m_BucketDir / m_BucketName);
uint64_t EntryCount = 0;
Stopwatch Timer;
const auto _ = MakeGuard([&] {
@@ -738,7 +738,7 @@ ZenCacheDiskLayer::CacheBucket::ReadIndexFile()
Stopwatch Timer;
const auto _ = MakeGuard([&] {
ZEN_INFO("read store '{}' index containing #{} entries in {}",
- m_BucketDir / m_BucketName,
+ IndexPath,
Entries.size(),
NiceTimeSpanMs(Timer.GetElapsedTimeMs()));
});
@@ -784,13 +784,12 @@ ZenCacheDiskLayer::CacheBucket::ReadIndexFile()
uint64_t
ZenCacheDiskLayer::CacheBucket::ReadLog(uint64_t SkipEntryCount)
{
- std::vector<DiskIndexEntry> Entries;
- std::filesystem::path LogPath = GetLogPath(m_BucketDir, m_BucketName);
+ std::filesystem::path LogPath = GetLogPath(m_BucketDir, m_BucketName);
if (std::filesystem::is_regular_file(LogPath))
{
Stopwatch Timer;
const auto _ = MakeGuard([&] {
- ZEN_INFO("read store '{}' log containing #{} entries in {}", LogPath, Entries.size(), NiceTimeSpanMs(Timer.GetElapsedTimeMs()));
+ ZEN_INFO("read store '{}' log containing #{} entries in {}", LogPath, m_Index.size(), NiceTimeSpanMs(Timer.GetElapsedTimeMs()));
});
TCasLogFile<DiskIndexEntry> CasLog;
CasLog.Open(LogPath, CasLogFile::Mode::kRead);
diff --git a/zenstore/compactcas.cpp b/zenstore/compactcas.cpp
index 8679eb95e..1c692b609 100644
--- a/zenstore/compactcas.cpp
+++ b/zenstore/compactcas.cpp
@@ -502,7 +502,7 @@ CasContainerStrategy::CollectGarbage(GcContext& GcCtx)
void
CasContainerStrategy::MakeIndexSnapshot()
{
- ZEN_INFO("write store snapshot for '{}'", m_RootDirectory / m_ContainerBaseName);
+ ZEN_DEBUG("write store snapshot for '{}'", m_RootDirectory / m_ContainerBaseName);
uint64_t EntryCount = 0;
Stopwatch Timer;
const auto _ = MakeGuard([&] {
@@ -592,7 +592,7 @@ CasContainerStrategy::ReadIndexFile()
Stopwatch Timer;
const auto _ = MakeGuard([&] {
ZEN_INFO("read store '{}' index containing #{} entries in {}",
- m_RootDirectory / m_ContainerBaseName,
+ IndexPath,
Entries.size(),
NiceTimeSpanMs(Timer.GetElapsedTimeMs()));
});