diff options
| author | Dan Engelbrecht <[email protected]> | 2024-09-04 10:03:38 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2024-09-04 10:03:38 +0200 |
| commit | c028afcc305457fc24ffc62b9b7197f44ba45689 (patch) | |
| tree | ba7e1929196e67d208745f8d7f065424677408b8 /src/zenstore/include | |
| parent | move gc logs to gc logger (#142) (diff) | |
| download | zen-c028afcc305457fc24ffc62b9b7197f44ba45689.tar.xz zen-c028afcc305457fc24ffc62b9b7197f44ba45689.zip | |
clean cache slog files on startup (#143)
- Bugfix: If we fail to move a temporary file into place, try to re-open the file so we clean it up
- Improvement: Clean up cache bucket log files at startup as we store the matching information in the index snapshot for the bucket
Diffstat (limited to 'src/zenstore/include')
| -rw-r--r-- | src/zenstore/include/zenstore/cache/cachedisklayer.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/zenstore/include/zenstore/cache/cachedisklayer.h b/src/zenstore/include/zenstore/cache/cachedisklayer.h index e7c995081..0afc80953 100644 --- a/src/zenstore/include/zenstore/cache/cachedisklayer.h +++ b/src/zenstore/include/zenstore/cache/cachedisklayer.h @@ -385,17 +385,21 @@ public: void SaveSnapshot(const std::function<uint64_t()>& ClaimDiskReserveFunc = []() { return 0; }); void WriteIndexSnapshot( RwLock::ExclusiveLockScope&, + bool FlushLockPosition, const std::function<uint64_t()>& ClaimDiskReserveFunc = []() { return 0; }) { - WriteIndexSnapshotLocked(ClaimDiskReserveFunc); + WriteIndexSnapshotLocked(FlushLockPosition, ClaimDiskReserveFunc); } void WriteIndexSnapshot( RwLock::SharedLockScope&, + bool FlushLockPosition, const std::function<uint64_t()>& ClaimDiskReserveFunc = []() { return 0; }) { - WriteIndexSnapshotLocked(ClaimDiskReserveFunc); + WriteIndexSnapshotLocked(FlushLockPosition, ClaimDiskReserveFunc); } - void WriteIndexSnapshotLocked(const std::function<uint64_t()>& ClaimDiskReserveFunc = []() { return 0; }); + void WriteIndexSnapshotLocked( + bool FlushLockPosition, + const std::function<uint64_t()>& ClaimDiskReserveFunc = []() { return 0; }); void CompactState(RwLock::ExclusiveLockScope& IndexLock, std::vector<BucketPayload>& Payloads, |