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

panic from bitswap usage during `Start` #159

Open distractedm1nd opened 1 year ago

distractedm1nd commented 1 year ago

Because Bitswap does not have a Start/Stop interface, and the Dagstore does not lock the d.shards map on startup, there can be a panic on concurrent read/write to d.shards.

For the short term, we are locking the dagstore during the Start operation. Should this be upstreamed? Is it feasible to add some sort of Start/Stop interface to bitswap as a better long term solution?