ETL fixes

* Don't use cache if cache is more recent than extracted ledger
* Use hardFetchLedgerRangeNoThrow exclusively in ETL, to prevent race
  condition
This commit is contained in:
CJ Cobb
2022-03-08 00:26:21 -05:00
parent ce01414fb3
commit 1510f24f4b
5 changed files with 55 additions and 46 deletions

View File

@@ -1,5 +1,11 @@
#include <backend/SimpleCache.h>
namespace Backend {
uint32_t
SimpleCache::latestLedgerSequence()
{
std::shared_lock lck{mtx_};
return latestSeq_;
}
void
SimpleCache::update(