filecoin-project / dagstore

a sharded store to hold large IPLD graphs efficiently, packaged as location-transparent attachable CAR files, with mechanical sympathy
Other
42 stars 24 forks source link

fix index backed blockstore panic by simplifying locking #147

Closed dirkmc closed 1 year ago

dirkmc commented 1 year ago

Fixes root cause of https://github.com/filecoin-project/boost/issues/1134

In this PR I've replaced the complex locking mechanism in IndexBackedBlockstore with a striped lock, so as to eliminate the possibility of a nil blockstore.

Note that it's easiest to view changes with whitespace diff turned off: https://github.com/filecoin-project/dagstore/pull/147/files?diff=unified&w=1