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