mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-26 14:05:51 +00:00
Improve LedgerMaster shard acquisition
This commit is contained in:
committed by
manojsdoshi
parent
8f50fd051e
commit
91e857874f
@@ -184,11 +184,8 @@ Shard::open(Scheduler& scheduler, nudb::context& ctx)
|
||||
}
|
||||
|
||||
if (boost::icl::length(storedSeqs) == maxLedgers_)
|
||||
{
|
||||
// All ledgers have been acquired, shard is complete
|
||||
acquireInfo_.reset();
|
||||
backendComplete_ = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -292,7 +289,6 @@ Shard::store(std::shared_ptr<Ledger const> const& ledger)
|
||||
if (!initSQLite(lock))
|
||||
return false;
|
||||
|
||||
acquireInfo_.reset();
|
||||
backendComplete_ = true;
|
||||
setBackendCache(lock);
|
||||
}
|
||||
@@ -574,8 +570,8 @@ Shard::finalize(
|
||||
}
|
||||
|
||||
hash = ledger->info().parentHash;
|
||||
next = std::move(ledger);
|
||||
--seq;
|
||||
next = ledger;
|
||||
}
|
||||
|
||||
JLOG(j_.debug()) << "shard " << index_ << " is valid";
|
||||
|
||||
Reference in New Issue
Block a user