20 #ifndef RIPPLE_APP_RDB_BACKEND_DETAIL_SHARD_H_INCLUDED
21 #define RIPPLE_APP_RDB_BACKEND_DETAIL_SHARD_H_INCLUDED
23 #include <ripple/app/ledger/Ledger.h>
24 #include <ripple/app/rdb/RelationalDatabase.h>
25 #include <ripple/app/rdb/UnitaryShard.h>
26 #include <ripple/core/Config.h>
27 #include <ripple/protocol/RippleLedgerHash.h>
28 #include <boost/filesystem.hpp>
46 DatabaseCon::Setup
const& setup,
47 DatabaseCon::CheckpointerSetup
const& checkpointerSetup);
63 soci::session& lgrMetaSession,
64 soci::session& txnMetaSession,
std::optional< std::uint32_t > getShardIndexforTransaction(soci::session &session, TxID const &id)
getShardIndexforTransaction Queries the transaction meta database to retrieve the index of the shard ...
uint256 TxID
A transaction identifier.
bool saveLedgerMeta(std::shared_ptr< Ledger const > const &ledger, Application &app, soci::session &lgrMetaSession, soci::session &txnMetaSession, std::uint32_t const shardIndex)
saveLedgerMeta Stores (transaction ID -> shard index) and (ledger hash -> shard index) mappings in th...
DatabasePair makeMetaDBs(Config const &config, DatabaseCon::Setup const &setup, DatabaseCon::CheckpointerSetup const &checkpointerSetup)
makeMetaDBs Opens ledger and transaction 'meta' databases which map ledger hashes and transaction IDs...
std::optional< std::uint32_t > getShardIndexforLedger(soci::session &session, LedgerHash const &hash)
getShardIndexforLedger Queries the ledger meta database to retrieve the index of the shard that conta...
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.