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

Fix FederatedStore cache collision #2903

Closed
GCHQDev404 opened this issue Feb 23, 2023 · 1 comment · Fixed by #2907
Closed

Fix FederatedStore cache collision #2903

GCHQDev404 opened this issue Feb 23, 2023 · 1 comment · Fixed by #2907
Assignees
Labels
bug Confirmed or suspected bug

Comments

@GCHQDev404
Copy link
Contributor

GCHQDev404 commented Feb 23, 2023

Describe the bug
When using the same cache implementation in a FederatedStore, the caches will collide.

To Reproduce

  1. Create a FederatedStore
  2. Add GraphA with a cache
  3. Add GraphB with a cache (same cache implementation)
  4. Add a NamedOperation to GraphA (NamedOperations are stored in the cache)
  5. List NamedOperations in GraphB - it will be visibile even though it should not be

Suggested solution
All graphs require suffix usage, similar to FederatedGraphStroage Cache.

@GCHQDev404 GCHQDev404 added the bug Confirmed or suspected bug label Feb 23, 2023
@GCHQDev404 GCHQDev404 added this to the v2.0.0-alpha-0.6 milestone Feb 23, 2023
GCHQDev404 added a commit that referenced this issue Feb 23, 2023
GCHQDev404 added a commit that referenced this issue Feb 24, 2023
GCHQDev404 added a commit that referenced this issue Feb 24, 2023
GCHQDev404 added a commit that referenced this issue Feb 24, 2023
GCHQDev404 added a commit that referenced this issue Feb 24, 2023
GCHQDev404 added a commit that referenced this issue Feb 24, 2023
… be able to add a Proxy Store with or without AddView and AddNamedOperations.
GCHQDev404 added a commit that referenced this issue Feb 24, 2023
… be able to add a Proxy Store with or without AddView and AddNamedOperations.
GCHQDev404 added a commit that referenced this issue Feb 24, 2023
… be able to add a Proxy Store with or without AddView and AddNamedOperations.
GCHQDev404 added a commit that referenced this issue Feb 24, 2023
… be able to add a Proxy Store with or without AddView and AddNamedOperations.
GCHQDev404 added a commit that referenced this issue Feb 24, 2023
GCHQDev404 added a commit that referenced this issue Feb 24, 2023
…ithin-a-federatedstore-environment' into gh-2903-part2

# Conflicts:
#	store-implementation/proxy-store/src/main/java/uk/gov/gchq/gaffer/proxystore/ProxyStore.java
@GCHQDev404 GCHQDev404 linked a pull request Feb 24, 2023 that will close this issue
GCHQDev404 added a commit that referenced this issue Feb 24, 2023
GCHQDev404 added a commit that referenced this issue Feb 24, 2023
GCHQDev404 added a commit that referenced this issue Feb 24, 2023
…ithin-a-federatedstore-environment' into gh-2903-part2

# Conflicts:
#	store-implementation/proxy-store/src/test/java/uk/gov/gchq/gaffer/proxystore/integration/ProxyStoreResponseDeserialiserIT.java
GCHQDev404 added a commit that referenced this issue Feb 24, 2023
GCHQDev404 added a commit that referenced this issue Feb 28, 2023
GCHQDev404 added a commit that referenced this issue Feb 28, 2023
…ithin-a-federatedstore-environment' into gh-2906-federatedstore-removegraph-must-clear-all-associated-caches
GCHQDev404 added a commit that referenced this issue Mar 1, 2023
…-collision' into gh-2903-all-caches-require-suffix-to-avoid-collisions-within-a-federatedstore-environment

# Conflicts:
#	store-implementation/proxy-store/src/main/java/uk/gov/gchq/gaffer/proxystore/ProxyStore.java
GCHQDev404 added a commit that referenced this issue Mar 1, 2023
GCHQDev404 added a commit that referenced this issue Mar 1, 2023
…-collision' into gh-2903-all-caches-require-suffix-to-avoid-collisions-within-a-federatedstore-environment
GCHQDev404 added a commit that referenced this issue Mar 1, 2023
…ithin-a-federatedstore-environment' into gh-2903-part2

# Conflicts:
#	store-implementation/proxy-store/src/main/java/uk/gov/gchq/gaffer/proxystore/ProxyStore.java
#	store-implementation/proxy-store/src/test/java/uk/gov/gchq/gaffer/proxystore/integration/ProxyStoreResponseDeserialiserIT.java
GCHQDev404 added a commit that referenced this issue Mar 2, 2023
…h-2903-return-proxy-store-to-no-cache-handlers

# Conflicts:
#	core/store/src/main/java/uk/gov/gchq/gaffer/store/Store.java
GCHQDev404 added a commit that referenced this issue Mar 3, 2023
GCHQDev404 added a commit that referenced this issue Mar 3, 2023
…oxy-store-to-no-cache-handlers

# Conflicts:
#	core/graph/src/test/java/uk/gov/gchq/gaffer/graph/GraphTest.java
#	store-implementation/proxy-store/src/main/java/uk/gov/gchq/gaffer/proxystore/ProxyStore.java
#	store-implementation/proxy-store/src/test/java/uk/gov/gchq/gaffer/proxystore/integration/ProxyStoreResponseDeserialiserIT.java
GCHQDev404 added a commit that referenced this issue Mar 3, 2023
GCHQDev404 added a commit that referenced this issue Mar 6, 2023
GCHQDev404 added a commit that referenced this issue Mar 6, 2023
…2912)

* gh-2886 FederatedStore remove double caching accidental collision.

* gh-2887 Test fixed to user correct cache instance due to suffix/name change.

* gh-2903 All Cache requires suffix

* gh-2903 Test changes for Cache requiring suffix

* gh-2903 Cherry Picked, improvements.

* gh-2903 test fix

* gh-2903 tidy.

* gh-2886 PR change

* gh-2886 review

* gh-2903 PR changes.

* gh-2903 PR changes.

* gh-2906 RemoveGraph to optionally delete Caches.

* gh-2906 spotless.

* gh-2909 duplication

* gh-2906 PR changes.

---------

Co-authored-by: GCHQDev404 <GCHQDev404@users.noreply.github.com>
GCHQDev404 added a commit that referenced this issue Mar 6, 2023
* gh-2886 FederatedStore remove double caching accidental collision.

* gh-2886 FederatedStore remove double caching accidental collision.

* gh-2887 Test fixed to user correct cache instance due to suffix/name change.

* gh-2903 removing 1.12 cache tests and graphStorage zero argument constructor.

* gh-2903 All Cache requires suffix

* gh-2903 Test changes for Cache requiring suffix

* gh-2903 spotless

* gh-2903 Cherry Picked, improvements.

* gh-2903 test fix

* gh-2903 test fix

* gh-2886 PR change

* gh-2903 tidy.

* gh-2886 review

* gh-2886 PR request

* gh-2886 PR request

* gh-2903 merge conflicts

* gh-2903 PR changes.

* gh-2903 PR changes.

* gh-2903 PR changes.

* gh-2903 PR changes.

* gh-2903 Cache changes for Score Resolvers.

* gh-2903 Cache changes for Score Resolvers.

* gh-2903 spotless

* gh-2909 AddGraph with Handlers.

* gh-2909 merge

* gh-2903 spotless

* gh-2909 improved getting operation declarations json

* gh-2909 duplication

* gh-2909 PR changes.

---------

Co-authored-by: GCHQDev404 <GCHQDev404@users.noreply.github.com>
GCHQDev404 added a commit that referenced this issue Mar 6, 2023
…oxy-store-to-no-cache-handlers

# Conflicts:
#	store-implementation/federated-store/src/test/java/uk/gov/gchq/gaffer/federatedstore/operation/handler/impl/FederatedAddGraphHandlerTest.java
GCHQDev404 added a commit that referenced this issue Mar 6, 2023
GCHQDev404 added a commit that referenced this issue Mar 6, 2023
GCHQDev404 added a commit that referenced this issue Mar 6, 2023
GCHQDev404 added a commit that referenced this issue Mar 6, 2023
@t92549 t92549 assigned t92549 and unassigned GCHQDev404 Apr 11, 2023
@t92549 t92549 removed a link to a pull request Apr 11, 2023
@t92549 t92549 assigned GCHQDev404 and unassigned t92549 Apr 11, 2023
@t92549 t92549 changed the title All Caches require suffix to avoid collisions within a FederatedStore environment. Fix FederatedStore cache collision Apr 11, 2023
@t92549
Copy link
Contributor

t92549 commented Apr 11, 2023

Closed by #2907

@t92549 t92549 closed this as completed Apr 11, 2023
@t92549 t92549 removed a link to a pull request Apr 11, 2023
t92549 added a commit that referenced this issue Apr 12, 2023
* gh-2903 Cache changes for Score Resolvers.

* gh-2903 spotless

* gh-2903 Proxy stripped of unnessary Handlers and hooks, but exception in return object?

* gh-2903 FederatedStore need to be able to add a Proxy Store with or without AddView and AddNamedOperations.

* gh-2903 duplicate ProxyStore as alternative to FederatedStore need to be able to add a Proxy Store with or without AddView and AddNamedOperations.

* gh-2903 Removing duplicate ProxyStore with Cache Handlers. instead IT with configured CacheHandlers.

* Fixed ProxyStoreWithNamedOpNamedViewITs

* Fixed new ProxyStoreWithNamedOpNamedViewITs class

* Fix ProxyStore NamedOp deserialisation

* Fix checkstyle

---------

Co-authored-by: GCHQDev404 <GCHQDev404@users.noreply.github.com>
Co-authored-by: t92549 <80890692+t92549@users.noreply.github.com>
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