Skip to content

Commit 7874c9b

Browse files
committed
let tokio know we're blocking!!!
i knew i missed this somewhere, idk how it took this long to remember where :s
1 parent e798135 commit 7874c9b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ufos/src/storage_fjall.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1350,7 +1350,7 @@ impl StoreBackground for FjallBackground {
13501350
loop {
13511351
tokio::select! {
13521352
_ = rollup.tick() => {
1353-
let (n, dirty) = self.0.step_rollup().inspect_err(|e| log::error!("rollup error: {e:?}"))?;
1353+
let (n, dirty) = tokio::task::block_in_place(|| self.0.step_rollup())?;
13541354
if n == 0 {
13551355
rollup.reset_after(Duration::from_millis(1_200)); // we're caught up, take a break
13561356
}
@@ -1363,7 +1363,7 @@ impl StoreBackground for FjallBackground {
13631363
let t0 = Instant::now();
13641364
let (mut total_danglers, mut total_deleted) = (0, 0);
13651365
for collection in &dirty_nsids {
1366-
let (danglers, deleted) = self.0.trim_collection(collection, 512, false).inspect_err(|e| log::error!("trim error: {e:?}"))?;
1366+
let (danglers, deleted) = tokio::task::block_in_place(|| self.0.trim_collection(collection, 512, false))?;
13671367
total_danglers += danglers;
13681368
total_deleted += deleted;
13691369
if total_deleted > 100_000_000 {

0 commit comments

Comments
 (0)