VirtualFlyBrain / VFB2

Virtual Fly Brain Documentation Site
https://virtualflybrain.org
MIT License
2 stars 4 forks source link

Queries on datasets with the same name cause cache issues #333

Open admclachlan opened 2 years ago

admclachlan commented 2 years ago
Description of the problem

Two datasets have the same name (but diff short form):

Splits targetting CX neurons, Wolff2018 [Wolff2018] Splits targetting CX neurons, Wolff2018 [FlyLight2019Wolff2018]

If you run a query for one, (in this case only list all images is available - https://v2.virtualflybrain.org/org.geppetto.frontend/geppetto?q=Wolff2018,DatasetImages) then when you run the same query for the other - https://v2.virtualflybrain.org/org.geppetto.frontend/geppetto?q=FlyLight2019Wolff2018,DatasetImages, you will get the same results as for the whichever one you ran first.

Clearing the cache fixes this until you run one a query for one of the datasets again.

This seems to be because Geppetto only uses the dataset name to determine if a query is already cached and so does not run the query again for whichever dataset is queried second.

This occurs on v2 and v2-dev

Potential fix- Don't use datasets with the same name (although in the example this probably does make sense, could add a version number?) Change the Geppetto caching to check the short form (which must be unique?) so that having the same name is not an issue.

Browser
OS
admclachlan commented 1 year ago

There are 10 instances of this (mostly Janelia FlyLIght reloads):

MATCH (ds :DataSet) WITH ds.label as label, count(ds) as freq WHERE freq > 1 RETURN label