Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache Service Static Instance Bug #2890

Closed
GCHQDev404 opened this issue Feb 16, 2023 · 1 comment · Fixed by #2893 or #2910
Closed

Cache Service Static Instance Bug #2890

GCHQDev404 opened this issue Feb 16, 2023 · 1 comment · Fixed by #2893 or #2910
Assignees
Labels
bug Confirmed or suspected bug

Comments

@GCHQDev404
Copy link
Contributor

GCHQDev404 commented Feb 16, 2023

Describe the bug
Cache service is Static, which means that any attempt to use a new cache can wipe/swap the cache.
This is horrendous for FederatedStore which uses the cache to store graphs. This is an Ancient bug but since the internal GraphStorage java object has been removed since #2595 this bug has appeared during docker containers testing.

Truth Table of error and behaviour below.

To Reproduce

  AddGraph with no Cache AddGraph with HashMap Cache AddGraph with JCS Cache
FederatedStore is currently using HashMap Cache Graph is added to HashMap Cache The Cache service continues to be HashMap Cache, the cache is initialised, FederatredStore only contains this new graph. The Cache service is switched to JCS Cache, the cache is initialised, JCS cache is loaded from disc, FederatredStore contains this new graph and anything pre-existing in the cache.
FederatedStore is currently using JCS Cache Graph is added to JCS Cache The Cache service is switched to HashMap Cache, the cache is initialised, FederatredStore only contains this new graph. The Cache service continues to be JCS Cache, the cache is initialised, JCS cache is loaded from disc, FederatredStore contains this new graph and anything pre-existing in the cache.
@GCHQDev404 GCHQDev404 added the bug Confirmed or suspected bug label Feb 16, 2023
@GCHQDev404 GCHQDev404 added this to the v2.0.0-alpha-0.5 milestone Feb 16, 2023
@GCHQDev404 GCHQDev404 changed the title Cache static instance Cache Service Static Instance Bug Feb 16, 2023
GCHQDev404 added a commit that referenced this issue Feb 18, 2023
@GCHQDev404 GCHQDev404 self-assigned this Feb 21, 2023
@t92549 t92549 linked a pull request Feb 22, 2023 that will close this issue
GCHQDev404 added a commit that referenced this issue Feb 22, 2023
t92549 pushed a commit that referenced this issue Feb 22, 2023
* gh-2890 cache service single static instance bug removal.

* Revert "gh-2890 cache service single static instance bug removal."

This reverts commit 59b23ab.

* gh-2890 cache service single static instance bug removal. K.I.S.S

* gh-2890 cache service single static instance bug removal. K.I.S.S Tests

* gh-2890 cache service. delete backwards compatibility 1.12

* gh-2890 cache service single static instance bug removal. K.I.S.S Tests

* gh-2890 cache service single static instance bug removal. spotbugs

* gh-2890 cache service static instance bug. proof test.

* checkstyle

* gh-2581 getTraits to use operation, tidy up.

---------

Co-authored-by: GCHQDev404 <GCHQDev404@users.noreply.github.com>
@t92549
Copy link
Contributor

t92549 commented Feb 22, 2023

Closed by #2893

GCHQDev404 added a commit that referenced this issue Mar 1, 2023
GCHQDev404 added a commit that referenced this issue Mar 1, 2023
GCHQDev404 added a commit that referenced this issue Mar 2, 2023
GCHQDev404 added a commit that referenced this issue Mar 2, 2023
GCHQDev404 added a commit that referenced this issue Mar 3, 2023
@t92549 t92549 linked a pull request Mar 7, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed or suspected bug
Projects
None yet
2 participants