|
xrpld
|
Classes | |
| class | Backend |
| A backend used for the NodeStore. More... | |
| class | Database |
| Persistency layer for NodeObject. More... | |
| class | DatabaseRotating |
| class | BatchWriter |
| Batch-writing assist logic. More... | |
| class | DatabaseNodeImp |
| class | DatabaseRotatingImp |
| class | DecodedBlob |
| Parsed key/value blob into NodeObject components. More... | |
| class | EncodedBlob |
| Convert a NodeObject from in-memory to database format. More... | |
| class | ManagerImp |
| struct | VarintTraits |
| struct | VarintTraits< T, true > |
| class | DummyScheduler |
| Simple NodeStore Scheduler that just performs the tasks synchronously. More... | |
| class | Factory |
| Base class for backend factories. More... | |
| class | Manager |
| Singleton for managing NodeStore factories and back ends. More... | |
| struct | FetchReport |
| Contains information about a fetch operation. More... | |
| struct | BatchWriteReport |
| Contains information about a batch write operation. More... | |
| class | Scheduler |
| Scheduling for asynchronous backend activity. More... | |
| struct | Task |
| Derived classes perform scheduled tasks. More... | |
| class | Sequence |
| Deterministic generator of a reproducible sequence of random NodeObjects. More... | |
| struct | BackendHarness |
| RAII owner of a NodeStore Backend opened on a private temporary directory. More... | |
| struct | DatabaseHarness |
| RAII owner of a NodeStore Database - the application-facing wrapper around a Backend, which adds fetch/store accounting and the async read-thread pool. More... | |
| struct | BackendConfig |
| struct | MemoryDB |
| class | MemoryFactory |
| class | MemoryBackend |
| class | NuDBBackend |
| class | NuDBFactory |
| class | NullBackend |
| class | NullFactory |
| class | DatabaseConfig_test |
| class | Progress |
| class | BackendTypeTest |
| class | NodeStoreDatabaseTestBase |
| class | NodeStoreDatabaseTest |
| class | NodeStoreDatabasePersistenceTest |
| class | DatabaseImportTest |
| struct | LessThan |
Typedefs | |
| using | Batch = std::vector<std::shared_ptr<NodeObject>> |
| A batch of NodeObjects to write at once. | |
Enumerations | |
| enum class | FetchType { Synchronous , Async } |
| enum class | Status { Ok = 0 , NotFound = 1 , DataCorrupt = 2 , Unknown = 3 , BackendError = 4 , CustomCode = 100 } |
| Return codes from Backend operations. More... | |
Functions | |
| template<class BufferFactory> | |
| std::pair< void const *, std::size_t > | lz4Decompress (void const *in, std::size_t inSize, BufferFactory &&bf) |
| template<class BufferFactory> | |
| std::pair< void const *, std::size_t > | lz4Compress (void const *in, std::size_t inSize, BufferFactory &&bf) |
| template<class BufferFactory> | |
| std::pair< void const *, std::size_t > | nodeobjectDecompress (void const *in, std::size_t inSize, BufferFactory &&bf) |
| template<class = void> | |
| void const * | zero32 () |
| template<class BufferFactory> | |
| std::pair< void const *, std::size_t > | nodeobjectCompress (void const *in, std::size_t inSize, BufferFactory &&bf) |
| template<class = void> | |
| void | filterInner (void *in, std::size_t inSize) |
| template<class = void> | |
| std::size_t | readVarint (void const *buf, std::size_t buflen, std::size_t &t) |
| template<class T> requires (std::is_unsigned_v<T>) | |
| std::size_t | sizeVarint (T v) |
| template<class = void> | |
| std::size_t | writeVarint (void *p0, std::size_t v) |
| template<class T> requires (std::is_same_v<T, Varint>) | |
| void | read (nudb::detail::istream &is, std::size_t &u) |
| template<class T> requires (std::is_same_v<T, Varint>) | |
| void | write (nudb::detail::ostream &os, std::size_t t) |
| template<class Generator> | |
| void | rngcpy (void *buffer, std::size_t bytes, Generator &g) |
| Section | parseConfig (std::string const &s) |
| Batch | makePool (std::uint8_t prefix, std::size_t count, std::size_t start=0) |
| std::vector< uint256 > | makeMissingKeys (std::size_t count) |
| std::size_t | averagePayload (Batch const &pool) |
| void | prepopulate (Backend &backend, Batch const &objects) |
| std::vector< std::size_t > | makeShuffle (std::size_t size, std::uint64_t seed) |
| std::vector< Batch > | sliceFixedBatches (Batch const &pool, std::size_t batchSize) |
| std::vector< BackendConfig > const & | backendConfigs () |
| void | registerMemoryFactory (Manager &manager) |
| void | registerNuDBFactory (Manager &manager) |
| void | registerNullFactory (Manager &manager) |
| BEAST_DEFINE_TESTSUITE (DatabaseConfig, nodestore, xrpl) | |
| std::map< std::string, std::string, boost::beast::iless > | parseArgs (std::string const &s) |
| TEST_P (BackendTypeTest, store_and_fetch) | |
| TEST_P (BackendTypeTest, persists_after_reopen) | |
| TEST_P (BackendTypeTest, fetch_missing) | |
| TEST_P (BackendTypeTest, concurrent_store_and_fetch) | |
| INSTANTIATE_TEST_SUITE_P (BackendTypes, BackendTypeTest, ::testing::ValuesIn(backendTypes()), [](::testing::TestParamInfo< std::string > const &info) { return info.param;}) | |
| TEST (NodeStoreBasics, predictable_batches) | |
| TEST (NodeStoreBasics, blob_encoding) | |
| TEST_P (NodeStoreDatabaseTest, store_and_fetch) | |
| TEST_P (NodeStoreDatabasePersistenceTest, round_trip) | |
| TEST_P (NodeStoreDatabaseTest, fetch_missing) | |
| INSTANTIATE_TEST_SUITE_P (NodeStoreBackends, NodeStoreDatabaseTest, ::testing::ValuesIn(allBackends()), [](::testing::TestParamInfo< std::string > const &info) { return info.param;}) | |
| INSTANTIATE_TEST_SUITE_P (PersistentBackends, NodeStoreDatabasePersistenceTest, ::testing::ValuesIn(persistentBackends()), [](::testing::TestParamInfo< std::string > const &info) { return info.param;}) | |
| TEST (NodeStoreDatabase, memory_earliest_seq) | |
| TEST_P (DatabaseImportTest, same_backend) | |
| INSTANTIATE_TEST_SUITE_P (ImportBackends, DatabaseImportTest, ::testing::ValuesIn(importBackends()), [](::testing::TestParamInfo< std::string > const &info) { return info.param;}) | |
| TEST (NuDBFactory, default_block_size) | |
| TEST (NuDBFactory, valid_block_sizes) | |
| TEST (NuDBFactory, invalid_block_sizes) | |
| TEST (NuDBFactory, log_messages) | |
| TEST (NuDBFactory, power_of_two_validation) | |
| TEST (NuDBFactory, both_constructor_variants) | |
| TEST (NuDBFactory, configuration_parsing) | |
| TEST (NuDBFactory, data_persistence) | |
| bool | isSame (std::shared_ptr< NodeObject > const &lhs, std::shared_ptr< NodeObject > const &rhs) |
| Batch | createPredictableBatch (std::size_t numObjects, std::uint64_t seed) |
| void | storeBatch (Backend &backend, Batch const &batch) |
| Batch | fetchCopyOfBatch (Backend &backend, Batch const &batch) |
| void | fetchMissing (Backend &backend, Batch const &batch) |
| void | storeBatch (Database &db, Batch const &batch) |
| Batch | fetchCopyOfBatch (Database &db, Batch const &batch) |
| void | fetchMissing (Database &db, Batch const &batch) |
Variables | |
| static constexpr auto | kBatchWritePreallocationSize = 256 |
| static constexpr auto | kBatchWriteLimitSize = 65536 |
| MemoryFactory * | gMemoryFactory = nullptr |
| constexpr std::size_t | kMinPayloadBytes = 1 |
| constexpr std::size_t | kMaxPayloadBytes = 2000 |
| constexpr int | kNumObjectsToTest = 2000 |
| constexpr int | kNumObjects = 2000 |
| constexpr std::uint64_t | kSeedValue = 50 |
A batch of NodeObjects to write at once.
Definition at line 37 of file nodestore/Types.h.
|
strong |
| Enumerator | |
|---|---|
| Synchronous | |
| Async | |
Definition at line 9 of file include/xrpl/nodestore/Scheduler.h.
|
strong |
Return codes from Backend operations.
| Enumerator | |
|---|---|
| Ok | |
| NotFound | |
| DataCorrupt | |
| Unknown | |
| BackendError | |
| CustomCode | |
Definition at line 24 of file nodestore/Types.h.
| std::pair< void const *, std::size_t > xrpl::node_store::lz4Decompress | ( | void const * | in, |
| std::size_t | inSize, | ||
| BufferFactory && | bf ) |
| std::pair< void const *, std::size_t > xrpl::node_store::lz4Compress | ( | void const * | in, |
| std::size_t | inSize, | ||
| BufferFactory && | bf ) |
| std::pair< void const *, std::size_t > xrpl::node_store::nodeobjectDecompress | ( | void const * | in, |
| std::size_t | inSize, | ||
| BufferFactory && | bf ) |
| void const * xrpl::node_store::zero32 | ( | ) |
| std::pair< void const *, std::size_t > xrpl::node_store::nodeobjectCompress | ( | void const * | in, |
| std::size_t | inSize, | ||
| BufferFactory && | bf ) |
| void xrpl::node_store::filterInner | ( | void * | in, |
| std::size_t | inSize ) |
| std::size_t xrpl::node_store::readVarint | ( | void const * | buf, |
| std::size_t | buflen, | ||
| std::size_t & | t ) |
| std::size_t xrpl::node_store::sizeVarint | ( | T | v | ) |
| std::size_t xrpl::node_store::writeVarint | ( | void * | p0, |
| std::size_t | v ) |
| void xrpl::node_store::read | ( | nudb::detail::istream & | is, |
| std::size_t & | u ) |
| void xrpl::node_store::write | ( | nudb::detail::ostream & | os, |
| std::size_t | t ) |
| void xrpl::node_store::rngcpy | ( | void * | buffer, |
| std::size_t | bytes, | ||
| Generator & | g ) |
Definition at line 41 of file NodeStoreBench.h.
| Section xrpl::node_store::parseConfig | ( | std::string const & | s | ) |
Definition at line 127 of file NodeStoreBench.h.
| Batch xrpl::node_store::makePool | ( | std::uint8_t | prefix, |
| std::size_t | count, | ||
| std::size_t | start = 0 ) |
Definition at line 139 of file NodeStoreBench.h.
| std::vector< uint256 > xrpl::node_store::makeMissingKeys | ( | std::size_t | count | ) |
Definition at line 152 of file NodeStoreBench.h.
| std::size_t xrpl::node_store::averagePayload | ( | Batch const & | pool | ) |
Definition at line 164 of file NodeStoreBench.h.
Definition at line 186 of file NodeStoreBench.h.
| std::vector< std::size_t > xrpl::node_store::makeShuffle | ( | std::size_t | size, |
| std::uint64_t | seed ) |
Definition at line 202 of file NodeStoreBench.h.
| std::vector< Batch > xrpl::node_store::sliceFixedBatches | ( | Batch const & | pool, |
| std::size_t | batchSize ) |
Definition at line 214 of file NodeStoreBench.h.
| std::vector< BackendConfig > const & xrpl::node_store::backendConfigs | ( | ) |
Definition at line 298 of file NodeStoreBench.h.
| void xrpl::node_store::registerMemoryFactory | ( | Manager & | manager | ) |
Definition at line 75 of file MemoryFactory.cpp.
| void xrpl::node_store::registerNuDBFactory | ( | Manager & | manager | ) |
Definition at line 440 of file libxrpl/nodestore/backend/NuDBFactory.cpp.
| void xrpl::node_store::registerNullFactory | ( | Manager & | manager | ) |
Definition at line 123 of file NullFactory.cpp.
| xrpl::node_store::BEAST_DEFINE_TESTSUITE | ( | DatabaseConfig | , |
| nodestore | , | ||
| xrpl | ) |
| std::map< std::string, std::string, boost::beast::iless > xrpl::node_store::parseArgs | ( | std::string const & | s | ) |
Definition at line 258 of file import_test.cpp.
| xrpl::node_store::TEST_P | ( | BackendTypeTest | , |
| store_and_fetch | ) |
Definition at line 93 of file tests/libxrpl/nodestore/Backend.cpp.
| xrpl::node_store::TEST_P | ( | BackendTypeTest | , |
| persists_after_reopen | ) |
Definition at line 113 of file tests/libxrpl/nodestore/Backend.cpp.
| xrpl::node_store::TEST_P | ( | BackendTypeTest | , |
| fetch_missing | ) |
Definition at line 131 of file tests/libxrpl/nodestore/Backend.cpp.
| xrpl::node_store::TEST_P | ( | BackendTypeTest | , |
| concurrent_store_and_fetch | ) |
Definition at line 142 of file tests/libxrpl/nodestore/Backend.cpp.
| xrpl::node_store::INSTANTIATE_TEST_SUITE_P | ( | BackendTypes | , |
| BackendTypeTest | , | ||
| ::testing::ValuesIn(backendTypes()) | , | ||
| [] (::testing::TestParamInfo< std::string > const &info) { return info.param;} | ) |
| xrpl::node_store::TEST | ( | NodeStoreBasics | , |
| predictable_batches | ) |
Definition at line 14 of file Basics.cpp.
| xrpl::node_store::TEST | ( | NodeStoreBasics | , |
| blob_encoding | ) |
Definition at line 24 of file Basics.cpp.
| xrpl::node_store::TEST_P | ( | NodeStoreDatabaseTest | , |
| store_and_fetch | ) |
Definition at line 98 of file tests/libxrpl/nodestore/Database.cpp.
| xrpl::node_store::TEST_P | ( | NodeStoreDatabasePersistenceTest | , |
| round_trip | ) |
Definition at line 119 of file tests/libxrpl/nodestore/Database.cpp.
| xrpl::node_store::TEST_P | ( | NodeStoreDatabaseTest | , |
| fetch_missing | ) |
Definition at line 137 of file tests/libxrpl/nodestore/Database.cpp.
| xrpl::node_store::INSTANTIATE_TEST_SUITE_P | ( | NodeStoreBackends | , |
| NodeStoreDatabaseTest | , | ||
| ::testing::ValuesIn(allBackends()) | , | ||
| [] (::testing::TestParamInfo< std::string > const &info) { return info.param;} | ) |
| xrpl::node_store::INSTANTIATE_TEST_SUITE_P | ( | PersistentBackends | , |
| NodeStoreDatabasePersistenceTest | , | ||
| ::testing::ValuesIn(persistentBackends()) | , | ||
| [] (::testing::TestParamInfo< std::string > const &info) { return info.param;} | ) |
| xrpl::node_store::TEST | ( | NodeStoreDatabase | , |
| memory_earliest_seq | ) |
Definition at line 157 of file tests/libxrpl/nodestore/Database.cpp.
| xrpl::node_store::TEST_P | ( | DatabaseImportTest | , |
| same_backend | ) |
Definition at line 200 of file tests/libxrpl/nodestore/Database.cpp.
| xrpl::node_store::INSTANTIATE_TEST_SUITE_P | ( | ImportBackends | , |
| DatabaseImportTest | , | ||
| ::testing::ValuesIn(importBackends()) | , | ||
| [] (::testing::TestParamInfo< std::string > const &info) { return info.param;} | ) |
| xrpl::node_store::TEST | ( | NuDBFactory | , |
| default_block_size | ) |
Definition at line 59 of file tests/libxrpl/nodestore/NuDBFactory.cpp.
| xrpl::node_store::TEST | ( | NuDBFactory | , |
| valid_block_sizes | ) |
Definition at line 66 of file tests/libxrpl/nodestore/NuDBFactory.cpp.
| xrpl::node_store::TEST | ( | NuDBFactory | , |
| invalid_block_sizes | ) |
Definition at line 85 of file tests/libxrpl/nodestore/NuDBFactory.cpp.
| xrpl::node_store::TEST | ( | NuDBFactory | , |
| log_messages | ) |
Definition at line 120 of file tests/libxrpl/nodestore/NuDBFactory.cpp.
| xrpl::node_store::TEST | ( | NuDBFactory | , |
| power_of_two_validation | ) |
Definition at line 178 of file tests/libxrpl/nodestore/NuDBFactory.cpp.
| xrpl::node_store::TEST | ( | NuDBFactory | , |
| both_constructor_variants | ) |
Definition at line 217 of file tests/libxrpl/nodestore/NuDBFactory.cpp.
| xrpl::node_store::TEST | ( | NuDBFactory | , |
| configuration_parsing | ) |
Definition at line 234 of file tests/libxrpl/nodestore/NuDBFactory.cpp.
| xrpl::node_store::TEST | ( | NuDBFactory | , |
| data_persistence | ) |
Definition at line 262 of file tests/libxrpl/nodestore/NuDBFactory.cpp.
|
nodiscard |
Definition at line 41 of file TestBase.h.
|
nodiscard |
Definition at line 48 of file TestBase.h.
Definition at line 85 of file TestBase.h.
Definition at line 92 of file TestBase.h.
Definition at line 113 of file TestBase.h.
Definition at line 125 of file TestBase.h.
Definition at line 135 of file TestBase.h.
Definition at line 150 of file TestBase.h.
|
staticconstexpr |
Definition at line 13 of file nodestore/Types.h.
|
staticconstexpr |
Definition at line 19 of file nodestore/Types.h.
| MemoryFactory* xrpl::node_store::gMemoryFactory = nullptr |
Definition at line 72 of file MemoryFactory.cpp.
|
constexpr |
Definition at line 24 of file TestBase.h.
|
constexpr |
Definition at line 25 of file TestBase.h.
|
constexpr |
Definition at line 26 of file TestBase.h.
|
constexpr |
Definition at line 27 of file TestBase.h.
|
constexpr |
Definition at line 28 of file TestBase.h.