Disable cache on missing data (#1368)

For #1354
This commit is contained in:
Alex Kremer
2024-04-24 18:57:32 +01:00
committed by GitHub
parent 82b8316978
commit c00342c792
18 changed files with 405 additions and 70 deletions

View File

@@ -20,6 +20,8 @@
#include "etl/ETLService.hpp"
#include "data/BackendInterface.hpp"
#include "data/LedgerCache.hpp"
#include "etl/CorruptionDetector.hpp"
#include "util/Assert.hpp"
#include "util/Constants.hpp"
#include "util/config/Config.hpp"
@@ -279,5 +281,8 @@ ETLService::ETLService(
state_.isReadOnly = config.valueOr("read_only", static_cast<bool>(state_.isReadOnly));
extractorThreads_ = config.valueOr<uint32_t>("extractor_threads", extractorThreads_);
txnThreshold_ = config.valueOr<size_t>("txn_threshold", txnThreshold_);
// This should probably be done in the backend factory but we don't have state available until here
backend_->setCorruptionDetector(CorruptionDetector<data::LedgerCache>{state_, backend->cache()});
}
} // namespace etl