aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/scrubcontext.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2023-12-11 11:48:23 +0100
committerGitHub <[email protected]>2023-12-11 11:48:23 +0100
commit37920b41048acffa30cf156d7d36bfc17ba15c0e (patch)
tree15c4f652a54470e359a9b9dcd194e89cb10eaaf9 /src/zenstore/scrubcontext.cpp
parentmulti-line logging improvements (#597) (diff)
downloadzen-37920b41048acffa30cf156d7d36bfc17ba15c0e.tar.xz
zen-37920b41048acffa30cf156d7d36bfc17ba15c0e.zip
improved scrubbing of oplogs and filecas (#596)
- Improvement: Scrub command now validates compressed buffer hashes in filecas storage (used for large chunks) - Improvement: Added --dry, --no-gc and --no-cas options to zen scrub command - Improvement: Implemented oplog scrubbing (previously was a no-op) - Improvement: Implemented support for running scrubbint at startup with --scrub=<options>
Diffstat (limited to 'src/zenstore/scrubcontext.cpp')
-rw-r--r--src/zenstore/scrubcontext.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/zenstore/scrubcontext.cpp b/src/zenstore/scrubcontext.cpp
index f5a3784c3..fbcd7d33c 100644
--- a/src/zenstore/scrubcontext.cpp
+++ b/src/zenstore/scrubcontext.cpp
@@ -33,6 +33,13 @@ ScrubContext::BadCids() const
return m_BadCid;
}
+bool
+ScrubContext::IsBadCid(const IoHash& Cid) const
+{
+ RwLock::SharedLockScope _(m_Lock);
+ return m_BadCid.ContainsHash(Cid);
+}
+
void
ScrubContext::ReportBadCidChunks(std::span<IoHash> BadCasChunks)
{