Skip to content

Commit

Permalink
feat: wait rocksdb finish
Browse files Browse the repository at this point in the history
  • Loading branch information
spartucus committed Jun 26, 2024
1 parent 64ae65b commit d20599e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions ola_core/src/bin/ola_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ async fn main() -> anyhow::Result<()> {
},
}
stop_sender.send(true).ok();
tokio::task::spawn_blocking(olaos_storage::db::RocksDB::await_rocksdb_termination)
.await
.unwrap();
tokio::time::sleep(Duration::from_secs(5)).await;
health_check_handle.stop().await;
olaos_logs::info!("Stopped");
Expand Down
5 changes: 4 additions & 1 deletion ola_core/src/sequencer/batch_executor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,10 @@ impl BatchExecutor {
.context_mode
.operator_address()
.to_fixed_bytes();
olaos_logs::info!("BlockExeManager::new with db path{}", secondary_storage_path.clone());
olaos_logs::info!(
"BlockExeManager::new with db path{}",
secondary_storage_path.clone()
);
let mut block_exe_manager = BlockExeManager::new(
secondary_storage_path,
network_config.ola_network_id as u64,
Expand Down
1 change: 0 additions & 1 deletion storage/src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,6 @@ impl<CF: NamedColumnFamily> RocksDB<CF> {
let raw_batch_bytes = raw_batch.data().to_vec();
let mut retries = self.stalled_writes_retries.intervals();
let mut stalled_write_reported = false;
let started_at = Instant::now();
loop {
match self.write_inner(raw_batch) {
Ok(()) => {
Expand Down
2 changes: 1 addition & 1 deletion types/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,4 @@ static PUBLISHED_BYTECODE_SIGNATURE: Lazy<H256> = Lazy::new(|| {
// "MarkedAsKnown",
// &[ethabi::ParamType::FixedBytes(32), ethabi::ParamType::Bool],
// )
});
});

0 comments on commit d20599e

Please sign in to comment.