diff options
| author | Stefan Boberg <[email protected]> | 2025-07-14 14:42:11 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2025-07-14 14:42:11 +0200 |
| commit | d8c7e909e56107903fccd9b56c2e3447dfc51870 (patch) | |
| tree | 0d839139e4402ff56b6cddbe94215787154e7815 /src | |
| parent | some ZEN_UNUSED fixes (diff) | |
| download | zen-d8c7e909e56107903fccd9b56c2e3447dfc51870.tar.xz zen-d8c7e909e56107903fccd9b56c2e3447dfc51870.zip | |
fixed recording replay by always using recovery path
Diffstat (limited to 'src')
| -rw-r--r-- | src/zenutil/cache/rpcrecording.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/zenutil/cache/rpcrecording.cpp b/src/zenutil/cache/rpcrecording.cpp index 0c788ddf3..cf22922b6 100644 --- a/src/zenutil/cache/rpcrecording.cpp +++ b/src/zenutil/cache/rpcrecording.cpp @@ -719,6 +719,15 @@ RecordedRequestsReader::BeginRead(const std::filesystem::path& BasePath, bool In m_InMemory = InMemory; m_BasePath = BasePath; + // Note: we currently ignore the root recording manifest to better handle partial + // or merged recordings, and recordings with deeper directory structure created as + // part of ad hoc organisation of larger recordings which may introduce another + // directory level to keep directories to a more reasonable size + // + // I'm not yet sure if we should just get rid of this forever though, so leaving + // the code in a disabled state for now. + +#if 0 std::error_code Ec; BasicFile InfoFile; InfoFile.Open(m_BasePath / "rpc_recording_info.zcb", BasicFile::Mode::kRead, Ec); @@ -756,6 +765,7 @@ RecordedRequestsReader::BeginRead(const std::filesystem::path& BasePath, bool In ZEN_WARN("could not read metadata file: {}", Ex.what()); } } +#endif ZEN_INFO("recovering segment info for '{}'", BasePath); @@ -784,7 +794,7 @@ RecordedRequestsReader::BeginRead(const std::filesystem::path& BasePath, bool In const SegmentInfo& Info = m_KnownSegments.emplace_back(SegmentInfo{.SegmentIndex = Segment["segment_index"sv].AsUInt64(), - .BaseRequestIndex = 0, + .BaseRequestIndex = 0, // computed below .RequestCount = Segment["entry_count"sv].AsUInt64(), .RequestBytes = 0, .StartTime = Segment["time_start"sv].AsDateTime(), |