diff options
Diffstat (limited to 'zenstore/include')
| -rw-r--r-- | zenstore/include/zenstore/CAS.h | 14 | ||||
| -rw-r--r-- | zenstore/include/zenstore/cidstore.h | 4 |
2 files changed, 15 insertions, 3 deletions
diff --git a/zenstore/include/zenstore/CAS.h b/zenstore/include/zenstore/CAS.h index bb310b179..ed235bb4b 100644 --- a/zenstore/include/zenstore/CAS.h +++ b/zenstore/include/zenstore/CAS.h @@ -8,6 +8,7 @@ #include <zencore/iobuffer.h> #include <zencore/iohash.h> #include <zencore/refcount.h> +#include <zencore/timer.h> #include <atomic> #include <filesystem> #include <memory> @@ -37,12 +38,22 @@ public: private: }; +/** Context object for data scrubbing + * + * Data scrubbing is when we traverse stored data to validate it and + * optionally correct/recover + */ + class ScrubContext { public: - virtual void ReportBadChunks(std::span<IoHash> BadChunks); + virtual void ReportBadChunks(std::span<IoHash> BadChunks); + inline uint64_t ScrubTimestamp() const { return m_ScrubTime; } + inline bool RunRecovery() const { return m_Recover; } private: + uint64_t m_ScrubTime = GetHifreqTimerValue(); + bool m_Recover = true; }; class CasChunkSet @@ -78,6 +89,7 @@ public: protected: CasStoreConfiguration m_Config; + uint64_t m_LastScrubTime = 0; }; ZENCORE_API CasStore* CreateCasStore(); diff --git a/zenstore/include/zenstore/cidstore.h b/zenstore/include/zenstore/cidstore.h index 49f2bf99a..f4439e083 100644 --- a/zenstore/include/zenstore/cidstore.h +++ b/zenstore/include/zenstore/cidstore.h @@ -50,8 +50,8 @@ public: // TODO: add batch filter support private: - struct CidState; - std::unique_ptr<CidState> m_Impl; + struct Impl; + std::unique_ptr<Impl> m_Impl; }; } // namespace zen |