eds/store: Fix ShardAccessor
caching for use in GetCAR
and CARBlockstore
#1514
Labels
ShardAccessor
caching for use in GetCAR
and CARBlockstore
#1514
In #1511 we stopped using the cached
ShardAccessor
on everyGetCAR
andCARBlockstore
request, as we realized it shares an underlying reader with other callers.This caching of the reader was made possible with celestiaorg/dagstore#1, but new modifications need to be made in order to protect the reader from both exhaustion and concurrent reads.
One proposed solution from @walldiss is to use
io.TeeReader
with concurrency protection, making sure a copy is saved into a buffer for subsequent reads.The text was updated successfully, but these errors were encountered: