ipfs/js-ipfs-block-service

Streams VS Callbacks API

daviddias opened this issue · 0 comments

In order to avoid the racing condition that became 100% obvious with the addition of locks to ipfs-repo(which made it slower and therefore creating a race condition 100% of the times), I've added a setTimeout to our callbacks API, making sure the callback is postponed till the write happens. This is not the correct solution, because if we try to do a heavy number of parallel writes, it won't save us.

Line: https://github.com/ipfs/js-ipfs-blocks/pull/12/files#r60848208

I want to move it to polling to make sure it was written. @dignifiedquire could you confirm this is the only viable option, with all your work on the same issue on idb-plus-blob-store.