You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Load a non-empty database (i.e. one that contains at least one bundle with at least one annotation item).
Delete all its sessions from disk.
Load the database again.
Now list_bundles(db) shows 0 bundles, but query() will still return the annotation items from the deleted data. This is because update_cache() just bails instead of deleting them from cache:
This problem was probably introduced years ago in f2f47da, while ”fighting with unit tests.” However maybe the whole loading process may have behaved differently at the time. It should probably be fixed by emptying the cache instead of bailing.
PR #268 broadens the problem, because it now allows loading of databases with empty sessions only; without addressing the issue. I will still accept the pull request because at the moment it is very useful and the bug has already existed for a while.
The text was updated successfully, but these errors were encountered:
I noticed this while reviewing PR #268 (thanks @FredrikKarlssonSpeech).
This is an edge case bug. Steps to reproduce:
Now
list_bundles(db)
shows 0 bundles, butquery()
will still return the annotation items from the deleted data. This is becauseupdate_cache()
just bails instead of deleting them from cache:https://github.com/IPS-LMU/emuR/blob/9c7cfd899755af3704e46d37b63f3be329bfed70/R/emuR-database.caching.R#LL29C1-L31C4
This problem was probably introduced years ago in f2f47da, while ”fighting with unit tests.” However maybe the whole loading process may have behaved differently at the time. It should probably be fixed by emptying the cache instead of bailing.
PR #268 broadens the problem, because it now allows loading of databases with empty sessions only; without addressing the issue. I will still accept the pull request because at the moment it is very useful and the bug has already existed for a while.
The text was updated successfully, but these errors were encountered: