mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-19 19:25:53 +00:00
fix sync interval failover bug
This commit is contained in:
@@ -695,7 +695,7 @@ public:
|
||||
doFinishWrites() override
|
||||
{
|
||||
if (!range || lastSync_ == 0 ||
|
||||
ledgerSequence_ - syncInterval_ == lastSync_)
|
||||
ledgerSequence_ - syncInterval_ >= lastSync_)
|
||||
{
|
||||
// wait for all other writes to finish
|
||||
sync();
|
||||
@@ -726,6 +726,14 @@ public:
|
||||
<< std::to_string(ledgerSequence_);
|
||||
lastSync_ = ledgerSequence_;
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info)
|
||||
<< __func__ << " Skipping commit. sync interval is "
|
||||
<< std::to_string(syncInterval_) << " - last sync is "
|
||||
<< std::to_string(lastSync_) << " - ledger sequence is "
|
||||
<< std::to_string(ledgerSequence_);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user