Skip to content

Commit

Permalink
Fix RocksDB closing (#2730)
Browse files Browse the repository at this point in the history
Used the idea from the comment:
facebook/rocksdb#11349 (comment)

To address `pthread lock: Invalid argument` error in CI:
https://github.com/FuelLabs/fuel-core/actions/runs/13423553399/job/37501700277

---------

Co-authored-by: AurelienFT <[email protected]>
  • Loading branch information
xgreenx and AurelienFT authored Feb 20, 2025
1 parent 9583c22 commit 5f1378e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions .changes/fixed/2730.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed RocksDB closing issue that potentially could panic.
1 change: 1 addition & 0 deletions crates/fuel-core/src/state/rocks_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ impl<Description> Drop for RocksDb<Description> {
// Drop the snapshot before the db.
// Dropping the snapshot after the db will cause a sigsegv.
self.snapshot = None;
self.db.cancel_all_background_work(true);
}
}

Expand Down

0 comments on commit 5f1378e

Please sign in to comment.