Improve NodeStore to ShardStore imports

* Run the import process in a background thread
* Prevent online_delete from removing ledgers pending import
This commit is contained in:
Devon White
2020-12-18 17:31:15 -05:00
committed by manojsdoshi
parent 14b2f27c3e
commit 38f954fd46
20 changed files with 711 additions and 302 deletions

View File

@@ -916,7 +916,7 @@ public:
using namespace std::chrono;
auto const start = steady_clock::now();
m_nodeStore->import(*source);
m_nodeStore->importDatabase(*source);
auto const elapsed =
duration_cast<seconds>(steady_clock::now() - start);
@@ -2109,7 +2109,7 @@ ApplicationImp::nodeToShards()
JLOG(m_journal.fatal()) << "Invalid [shard_db] configuration";
return false;
}
shardStore_->import(getNodeStore());
shardStore_->importDatabase(getNodeStore());
return true;
}