Invalidate shard index cache when chunk source cache is invalidated#882
Invalidate shard index cache when chunk source cache is invalidated#882r2dliu wants to merge 1 commit intogoogle:masterfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
@r2dliu Can you explain how to reproduce this? It looks like it relies on |
|
Step 1: Load a zarr3 dataset from your fileserver into neuroglancer |
Problem:
When invalidateCache() is called on a ZarrVolumeChunkSource (e.g. after an external write to a sharded zarr3 array), only the chunk data cache is invalidated. The shard index cache remains stale.
A normal refresh fixes the issue since all caches are cleared on reload, but programmatically clearing the cache using the neuroglancer internals caused wonky behavior and garbage data loading.
This is probably a pretty niche issue and is certainly and uncommon or potentially even bad use case. This is a hacky fix that I threw together but curious what pattern the maintainers might prefer, or whether they would consider it worth addressing to begin with.