go-car icon indicating copy to clipboard operation
go-car copied to clipboard

feat: extract TraversalResumerPathState interface and allow it to be shared across traversals

Open rvagg opened this issue 1 year ago • 2 comments

I think if we allowed for a stored/shared TraversalResumerPathState (interface for pathState) then we should be able to resume across any selective CAR that has the same selector & DAG.

For the purpose of Boost, we'd make one of these things, then share it across any CAR creation that happens, accumulating state and allowing the Seek() to move forward in the CAR, skipping over blocks that don't interfere the traversal and that don't need.

The catch for Boost is that it needs to be thread safe, so we'd need to wrap it all in a mutex, but we can do that over there.

rvagg avatar Aug 11 '22 08:08 rvagg