Skip to content

Commit

Permalink
Use TransactionDB rather than OptimisticTransactionDB.
Browse files Browse the repository at this point in the history
  • Loading branch information
clemahieu committed Jul 9, 2024
1 parent c92c3ed commit 59e874b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nano/secure/ledger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1265,15 +1265,15 @@ bool nano::ledger::migrate_lmdb_to_rocksdb (std::filesystem::path const & data_p
// Open rocksdb database
nano::rocksdb_config rocksdb_config;
rocksdb_config.enable = true;
rocksdb_config.memory_multiplier = std::numeric_limits<uint8_t>::max ();
//rocksdb_config.memory_multiplier = 4;
auto rocksdb_store = nano::make_store (logger, data_path_a, nano::dev::constants, false, true, rocksdb_config);

if (!rocksdb_store->init_error ())
{
auto table_size = store.count (store.tx_begin_read (), tables::blocks);
logger.info (nano::log::type::ledger, "Step 1 of 7: Converting {} million entries from blocks table", table_size / 1000000);
std::atomic<std::size_t> count = 0;
auto refresh_interval = 20ms;
auto refresh_interval = 100ms;
store.block.for_each_par (
[&] (store::read_transaction const & /*unused*/, auto i, auto n) {
auto rocksdb_transaction (rocksdb_store->tx_begin_write ({}, { nano::tables::blocks }));
Expand Down

0 comments on commit 59e874b

Please sign in to comment.