mirror of
https://github.com/XRPLF/clio.git
synced 2026-06-06 02:06:58 +00:00
feat: Recover from fallback writer state (#3000)
Add a timer and new `FallbackRecovery` state to try to recover from `Fallback` writer state every hour. Fixes #2997
This commit is contained in:
@@ -69,6 +69,7 @@ void
|
||||
WriterState::setWriterDecidingFallback()
|
||||
{
|
||||
systemState_->isWriterDecidingFallback = true;
|
||||
isFallbackRecovery_ = false;
|
||||
}
|
||||
|
||||
bool
|
||||
@@ -77,6 +78,21 @@ WriterState::isFallback() const
|
||||
return systemState_->isWriterDecidingFallback;
|
||||
}
|
||||
|
||||
bool
|
||||
WriterState::isFallbackRecovery() const
|
||||
{
|
||||
return isFallbackRecovery_;
|
||||
}
|
||||
|
||||
void
|
||||
WriterState::setFallbackRecovery(bool newValue)
|
||||
{
|
||||
if (newValue) {
|
||||
systemState_->isWriterDecidingFallback = false;
|
||||
}
|
||||
isFallbackRecovery_ = newValue;
|
||||
}
|
||||
|
||||
bool
|
||||
WriterState::isEtlStarted() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user