|
rippled
|

Classes | |
| struct | AcquireInfo |
| class | Count |
| struct | StoreLedgerResult |
| Store a ledger. More... | |
Public Member Functions | |
| Shard (Shard const &)=delete | |
| Copy constructor (disallowed) More... | |
| Shard (Shard &&)=delete | |
| Move constructor (disallowed) More... | |
| Shard & | operator= (Shard const &)=delete |
| Shard & | operator= (Shard &&)=delete |
| Shard (Application &app, DatabaseShard const &db, std::uint32_t index, boost::filesystem::path const &dir, beast::Journal j) | |
| Shard (Application &app, DatabaseShard const &db, std::uint32_t index, beast::Journal j) | |
| ~Shard () | |
| bool | init (Scheduler &scheduler, nudb::context &context) |
| Initialize shard. More... | |
| bool | isOpen () const |
| Returns true if the database are open. More... | |
| bool | tryClose () |
| Try to close databases if not in use. More... | |
| void | stop () noexcept |
| Notify shard to prepare for shutdown. More... | |
| std::optional< std::uint32_t > | prepare () |
| bool | storeNodeObject (std::shared_ptr< NodeObject > const &nodeObject) |
| std::shared_ptr< NodeObject > | fetchNodeObject (uint256 const &hash, FetchReport &fetchReport) |
| StoreLedgerResult | storeLedger (std::shared_ptr< Ledger const > const &srcLedger, std::shared_ptr< Ledger const > const &next) |
| bool | setLedgerStored (std::shared_ptr< Ledger const > const &ledger) |
| bool | containsLedger (std::uint32_t ledgerSeq) const |
| std::uint32_t | index () const noexcept |
| boost::filesystem::path const & | getDir () const noexcept |
| std::chrono::steady_clock::time_point | getLastUse () const |
| std::pair< std::uint64_t, std::uint32_t > | getFileInfo () const |
| Returns a pair where the first item describes the storage space utilized and the second item is the number of file descriptors required. More... | |
| ShardState | getState () const noexcept |
| std::uint32_t | getPercentProgress () const noexcept |
| Returns a percent signifying how complete the current state of the shard is. More... | |
| std::int32_t | getWriteLoad () |
| bool | isLegacy () const |
Returns true if shard is older, without final key data. More... | |
| bool | finalize (bool writeSQLite, std::optional< uint256 > const &referenceHash) |
| Finalize shard by walking its ledgers, verifying each Merkle tree and creating a deterministic backend. More... | |
| void | removeOnDestroy () noexcept |
| Enables removal of the shard directory on destruction. More... | |
| std::string | getStoredSeqs () |
| template<typename... Args> | |
| bool | callForLedgerSQL (std::function< bool(Args... args)> const &callback) |
| Invoke a callback on the ledger SQLite db. More... | |
| template<typename... Args> | |
| bool | callForTransactionSQL (std::function< bool(Args... args)> const &callback) |
| Invoke a callback on the transaction SQLite db. More... | |
Static Public Attributes | |
| static constexpr std::uint32_t | version {2} |
| static const uint256 | finalKey {0} |
Private Member Functions | |
| bool | open (std::lock_guard< std::mutex > const &lock) |
| bool | initSQLite (std::lock_guard< std::mutex > const &) |
| bool | storeSQLite (std::shared_ptr< Ledger const > const &ledger) |
| void | setFileStats (std::lock_guard< std::mutex > const &) |
| bool | verifyLedger (std::shared_ptr< Ledger const > const &ledger, std::shared_ptr< Ledger const > const &next, std::shared_ptr< DeterministicShard > const &dShard) const |
| std::shared_ptr< NodeObject > | verifyFetch (uint256 const &hash) const |
| Shard::Count | makeBackendCount () |
| template<typename... Args> | |
| bool | callForSQL (std::function< bool(Args... args)> const &callback, LockedSociSession &&db) |
| bool | doCallForSQL (std::function< bool(soci::session &session)> const &callback, LockedSociSession &&db) |
| bool | doCallForSQL (std::function< bool(soci::session &session, std::uint32_t shardIndex)> const &callback, LockedSociSession &&db) |
Private Attributes | |
| Application & | app_ |
| const beast::Journal | j_ |
| std::mutex | mutex_ |
| std::mutex | storedMutex_ |
| const std::uint32_t | index_ |
| const std::uint32_t | firstSeq_ |
| const std::uint32_t | lastSeq_ |
| const std::uint32_t | maxLedgers_ |
| const boost::filesystem::path | dir_ |
| std::uint64_t | fileSz_ {0} |
| std::uint32_t | fdRequired_ {0} |
| std::unique_ptr< Backend > | backend_ |
| std::atomic< std::uint32_t > | backendCount_ {0} |
| std::unique_ptr< DatabaseCon > | lgrSQLiteDB_ |
| std::unique_ptr< DatabaseCon > | txSQLiteDB_ |
| std::unique_ptr< AcquireInfo > | acquireInfo_ |
| bool | legacy_ {false} |
| std::atomic< bool > | stop_ {false} |
| std::atomic< bool > | busy_ {false} |
| std::atomic< ShardState > | state_ {ShardState::acquire} |
| std::atomic< std::uint32_t > | progress_ {0} |
| std::atomic< bool > | removeOnDestroy_ {false} |
| std::chrono::steady_clock::time_point | lastAccess_ |
|
delete |
Copy constructor (disallowed)
|
delete |
Move constructor (disallowed)
| ripple::NodeStore::Shard::Shard | ( | Application & | app, |
| DatabaseShard const & | db, | ||
| std::uint32_t | index, | ||
| boost::filesystem::path const & | dir, | ||
| beast::Journal | j | ||
| ) |
| ripple::NodeStore::Shard::Shard | ( | Application & | app, |
| DatabaseShard const & | db, | ||
| std::uint32_t | index, | ||
| beast::Journal | j | ||
| ) |
| bool ripple::NodeStore::Shard::init | ( | Scheduler & | scheduler, |
| nudb::context & | context | ||
| ) |
| bool ripple::NodeStore::Shard::isOpen | ( | ) | const |
| bool ripple::NodeStore::Shard::tryClose | ( | ) |
|
noexcept |
| std::optional< std::uint32_t > ripple::NodeStore::Shard::prepare | ( | ) |
| bool ripple::NodeStore::Shard::storeNodeObject | ( | std::shared_ptr< NodeObject > const & | nodeObject | ) |
| std::shared_ptr< NodeObject > ripple::NodeStore::Shard::fetchNodeObject | ( | uint256 const & | hash, |
| FetchReport & | fetchReport | ||
| ) |
| Shard::StoreLedgerResult ripple::NodeStore::Shard::storeLedger | ( | std::shared_ptr< Ledger const > const & | srcLedger, |
| std::shared_ptr< Ledger const > const & | next | ||
| ) |
| bool ripple::NodeStore::Shard::setLedgerStored | ( | std::shared_ptr< Ledger const > const & | ledger | ) |
| bool ripple::NodeStore::Shard::containsLedger | ( | std::uint32_t | ledgerSeq | ) | const |
|
noexcept |
|
noexcept |
| std::chrono::steady_clock::time_point ripple::NodeStore::Shard::getLastUse | ( | ) | const |
| std::pair< std::uint64_t, std::uint32_t > ripple::NodeStore::Shard::getFileInfo | ( | ) | const |
|
noexcept |
|
noexcept |
| std::int32_t ripple::NodeStore::Shard::getWriteLoad | ( | ) |
| bool ripple::NodeStore::Shard::isLegacy | ( | ) | const |
| bool ripple::NodeStore::Shard::finalize | ( | bool | writeSQLite, |
| std::optional< uint256 > const & | referenceHash | ||
| ) |
Finalize shard by walking its ledgers, verifying each Merkle tree and creating a deterministic backend.
| writeSQLite | If true, SQLite entries will be rewritten using verified backend data. |
| referenceHash | If present, this hash must match the hash of the last ledger in the shard. |
|
noexcept |
| std::string ripple::NodeStore::Shard::getStoredSeqs | ( | ) |
| bool ripple::NodeStore::Shard::callForLedgerSQL | ( | std::function< bool(Args... args)> const & | callback | ) |
| bool ripple::NodeStore::Shard::callForTransactionSQL | ( | std::function< bool(Args... args)> const & | callback | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticconstexpr |
|
private |
|
private |
|
mutableprivate |
|
mutableprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
1.8.17