ObjectStoreDirectoryService fails with nar bridge
#419
Opened by sinavir at
ObjectStoreDirectoryService fails with nar bridge because the implementation of get in object store directory service only works for root nodes. The nar renderer doesn't use the get_recursive method but a custom walker (https://code.tvl.fyi/tree/tvix/store/src/nar/renderer.rs#n113) thus failing retrieving lower nodes.
I see 2 ways to fix that:
- Use get_recursive in the renderer (we will have to add a data structure to remember the nodes that are waiting to be put into the nar stream)
- Add a cache in the ObjectStoreDirectoryService implementation to remember the nodes under the last accessed root nodes (however cache invalidation should be thought well if we don't want hard to debug failures)
I believe the first way is the one to implement
Had a chat with @yuka about this - we might need to extend the
DirectoryService
trait to signal on whether it supports individual access or not, and think about how to expose this on all implementations.flokli at 2024-10-26T10·31+00