Skip to content

Commit

Permalink
remove unnecessary backtrace (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
0g-peterzhb authored Nov 25, 2024
1 parent b9e6431 commit d0aad15
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions node/storage-async/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
extern crate tracing;

use anyhow::bail;
use backtrace::Backtrace;
use shared_types::{
Chunk, ChunkArray, ChunkArrayWithProof, DataRoot, FlowProof, FlowRangeProof, Transaction,
};
Expand Down Expand Up @@ -140,17 +139,13 @@ impl Store {
{
let store = self.store.clone();
let (tx, rx) = oneshot::channel();
let mut backtrace = Backtrace::new();
let frames = backtrace.frames().to_vec();
backtrace = frames.into();

self.executor.spawn_blocking(
move || {
// FIXME(zz): Not all functions need `write`. Refactor store usage.
let res = f(&*store);

if tx.send(res).is_err() {
warn!("Backtrace: {:?}", backtrace);
error!("Unable to complete async storage operation: the receiver dropped");
}
},
Expand Down

0 comments on commit d0aad15

Please sign in to comment.