22#include "etl/SystemState.hpp"
23#include "util/log/Logger.hpp"
34template <
typename CacheType>
36 std::reference_wrapper<SystemState> state_;
37 std::reference_wrapper<CacheType> cache_;
58 if (not state_.get().isCorruptionDetected) {
59 state_.get().isCorruptionDetected =
true;
61 LOG(log_.
error()) <<
"Disabling the cache to avoid corrupting the DB further. Please investigate.";
62 cache_.get().setDisabled();
A helper to notify Clio operator about a corruption in the DB.
Definition CorruptionDetector.hpp:35
CorruptionDetector(SystemState &state, CacheType &cache)
Construct a new Corruption Detector object.
Definition CorruptionDetector.hpp:48
void onCorruptionDetected()
Notify the operator about a corruption in the DB.
Definition CorruptionDetector.hpp:56
A simple thread-safe logger for the channel specified in the constructor.
Definition Logger.hpp:110
Pump error(SourceLocationType const &loc=CURRENT_SRC_LOCATION) const
Interface for logging at Severity::ERR severity.
Definition Logger.cpp:215
This namespace contains everything to do with the ETL and ETL sources.
Definition CacheLoader.hpp:36
Represents the state of the ETL subsystem.
Definition SystemState.hpp:33