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

gh-2457 double caching issue #2595

Merged
merged 149 commits into from
Nov 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
d723c86
gh-2357 FederatedStore FederatedOperation Operation/Graph/Merge
GCHQDev404 Feb 4, 2021
a5ca20d
gh-2357 FederatedStore FederatedOperation Handlers
GCHQDev404 Feb 5, 2021
af378dc
gh-2357 FederatedStore FederatedOperation IFederationOperation, Handl…
GCHQDev404 Feb 5, 2021
f479fee
gh-2357 FederatedStore FederatedOperation FederatedStore
GCHQDev404 Feb 8, 2021
0d55966
gh-2357 FederatedStore FederatedOperation removal of option KEY_OPERA…
GCHQDev404 Mar 3, 2021
72f91ee
gh-2357 FederatedStore FederatedOperation GetSchema & GetTraits Changes
GCHQDev404 Mar 5, 2021
a880437
gh-2357 FederatedStore FederatedOperation IFederatedOperation
GCHQDev404 Mar 5, 2021
d3ef8d0
gh-2357 FederatedStore FederatedOperation deletion of FederatedOperat…
GCHQDev404 Mar 5, 2021
a126c21
gh-2357 FederatedStore FederatedOperation viewValidation
GCHQDev404 Mar 5, 2021
1d1e980
gh-2357 FederatedStore FederatedOperation Merging of results
GCHQDev404 Mar 5, 2021
f7c1a29
gh-2357 FederatedStore FederatedOperation Tests, CodeStyle, Refactori…
GCHQDev404 Mar 5, 2021
5816568
gh-2357 FederatedStore FederatedOperation.v02 Builder IO focus
GCHQDev404 Mar 9, 2021
45b2869
gh-2357 FederatedStore FederatedOperation.v02. Removing suspected unr…
GCHQDev404 Mar 25, 2021
14befc0
gh-2357 FederatedStore FederatedOperation.v02. Resolving TODOs
GCHQDev404 Apr 7, 2021
3cecb28
gh-2357 FederatedStore FederatedOperation.v02. Removing overly constr…
GCHQDev404 Apr 7, 2021
d713f6d
Merge branch 'gh-2357-federatedstore-federated-operation' into gh-235…
GCHQDev404 Apr 23, 2021
629b17c
gh-2357 FederatedStore FederatedOperation.v02. Resolving TODOs
GCHQDev404 Apr 23, 2021
45d0b25
gh-2357 FederatedStore FederatedOperation.v02. checkstyle
GCHQDev404 Apr 27, 2021
9d0faeb
gh-2357 FederatedStore FederatedOperation.v02. Resolving TODOs.
GCHQDev404 Apr 27, 2021
467fca5
gh-2357 FederatedStore FederatedOperation.v02 with errors
GCHQDev404 May 4, 2021
d8788a2
gh-2357 FederatedStore FederatedOperation.v02 isRequestingAdmin added…
GCHQDev404 May 5, 2021
cb28d68
gh-2357 FederatedStore FederatedOperation.v02 IFederation builder cha…
GCHQDev404 May 5, 2021
d44d171
gh-2357 FederatedStore FederatedOperation.v02 IFederation shallowClon…
GCHQDev404 May 7, 2021
0839f87
gh-2357 FederatedStore FederatedOperation.v02 IFederation userRequest…
GCHQDev404 May 10, 2021
bcde199
gh-2357 FederatedStore FederatedOperation.v02 IFederation userRequest…
GCHQDev404 May 10, 2021
b514e1a
gh-2357 FederatedStore FederatedOperation.v02 bugfix.
GCHQDev404 May 11, 2021
83b92ef
gh-2357 FederatedStore FederatedOperation.v02 removing TODOs.
GCHQDev404 May 12, 2021
15998b0
gh-2422 FederatedStore ChangeGraphId & ChangeGraphAccess update cache…
GCHQDev404 May 12, 2021
5cff563
gh-2357 FederatedStore FederatedOperation.v02 removing TODOs.
GCHQDev404 May 12, 2021
df74b9c
gh-2357 FederatedStore FederatedOperation.v02 removing TODOs. BugHunt
GCHQDev404 May 14, 2021
a5e25f2
gh-2357 FederatedStore FederatedOperation.v02 removing TODOs.
GCHQDev404 May 12, 2021
8c705ee
gh-2425 remove duplicate updateOperationInput
GCHQDev404 May 17, 2021
22a556c
gh-2357 FederatedStore FederatedOperation.v02 removing TODOs.
GCHQDev404 May 17, 2021
0455302
gh-2357 FederatedStore FederatedOperation.v02 FederatedOperation is I…
GCHQDev404 May 17, 2021
47cda10
gh-2357 FederatedStore FederatedOperation.v02 removing TODOs. BugHunt
GCHQDev404 May 19, 2021
057086a
gh-2357 FederatedStore FederatedOperation.v02 FederatedOperation is I…
GCHQDev404 May 20, 2021
f382249
fixing bug
GCHQDev404 May 21, 2021
ede77b1
gh-2357 FederatedStore FederatedOperation.v02 FederatedOperation is I…
GCHQDev404 May 26, 2021
6a71eb2
Merge remote-tracking branch 'origin/develop' into gh-2357-federateds…
GCHQDev404 Jun 18, 2021
9d05f2f
gh-2357 FederatedStore FederatedOperation.v02 Error Returning Accumul…
GCHQDev404 Jun 18, 2021
016ee5c
gh-2357 FederatedStore FederatedOperation.v02 MASSIVE bug fix for Ite…
GCHQDev404 Jun 18, 2021
ee4c293
gh-2357 FederatedStore FederatedOperation.v02 IterableConcat fixes
GCHQDev404 Jun 18, 2021
3469867
Merge remote-tracking branch 'origin/develop' into gh-2357-FedOp-bughunt
GCHQDev404 Jun 18, 2021
b77ffc0
Merge branch 'gh-2357-federatedstore-federated-operation' into gh-235…
GCHQDev404 Jun 18, 2021
543846c
gh-2357 FederatedStore FederatedOperation.v02 summary
GCHQDev404 Jun 18, 2021
c070247
gh-2357 FederatedStore FederatedOperation.v02 ChainedIterable ported …
GCHQDev404 Jun 29, 2021
57248bc
gh-2357 FederatedStore FederatedOperation.v02 checkstyle
GCHQDev404 Jun 29, 2021
85419f8
gh-2357 FederatedStore FederatedOperation.v02 Traits
GCHQDev404 Jun 29, 2021
f64d126
gh-2455 FederatedStore GetTraits Audit. Removing dead code and correc…
GCHQDev404 Jun 30, 2021
15de583
gh-2455 FederatedStore GetTraits Audit. Refactoring FederatedGetTrait…
GCHQDev404 Jul 5, 2021
d300881
Merge remote-tracking branch 'origin/develop' into gh-2357-federateds…
GCHQDev404 Jul 5, 2021
1324d92
gh-2457-double-caching-issue weak initial step, requires synchronisat…
GCHQDev404 Jul 5, 2021
1d2f4b1
Merge branch 'gh-2455-FederatedStore-getTraits-audit' into gh-2357-fe…
GCHQDev404 Jul 5, 2021
ed912c8
gh-2455 FederatedStore GetTraits Audit. Refactoring FederatedGetTrait…
GCHQDev404 Jul 6, 2021
687c293
Merge branch 'gh-2455-FederatedStore-getTraits-audit' into gh-2357-fe…
GCHQDev404 Jul 6, 2021
9c9ff98
gh-2455 FederatedStore GetTraits Audit. Refactoring
GCHQDev404 Jul 6, 2021
e30d2fb
Revert "gh-2457-double-caching-issue weak initial step, requires sync…
GCHQDev404 Jul 8, 2021
63c50fa
gh-2457-double-caching-issue remove FederatedGraphStorage local map, …
GCHQDev404 Jul 8, 2021
34459df
gh-2457-double-caching-issue remove FederatedGraphStorage test fixes
GCHQDev404 Jul 9, 2021
6996719
gh-2457-double-caching-issue remove FederatedGraphStorage review.
GCHQDev404 Jul 11, 2021
7872bb8
Merge remote-tracking branch 'origin/develop' into gh-2457-double-cac…
GCHQDev404 Jul 11, 2021
d09addf
gh-2457-double-caching-removing-graphstorage minimising use of GraphS…
GCHQDev404 Jul 16, 2021
e25aa3e
gh-2457-double-caching-removing-graphstorage gh-2478 JobTracker cache…
GCHQDev404 Jul 16, 2021
1541f82
gh-2422 FederatedStore ChangeGraphId & ChangeGraphAccess recovery info.
GCHQDev404 Jul 19, 2021
f907085
Merge remote-tracking branch 'origin/gh-2455-FederatedStore-getTraits…
GCHQDev404 Jul 19, 2021
0e809e2
gh-2357 FederatedStore FederatedOperation.v02 GetSchema
GCHQDev404 Jul 19, 2021
9d27155
gh-2357 FederatedStore FederatedOperation.v02 TODOs
GCHQDev404 Jul 26, 2021
5da593f
Merge remote-tracking branch 'origin/develop' into gh-2357-federateds…
GCHQDev404 Jul 27, 2021
80e4802
gh-2357 FederatedStore FederatedOperation.v02 TODOs
GCHQDev404 Jul 27, 2021
43555fe
gh-2357 FederatedStore FederatedOperation.v02 TODOs
GCHQDev404 Jul 27, 2021
c57c218
gh-2357 FederatedStore FederatedOperation.v02 PR review
GCHQDev404 Jul 28, 2021
cca0d2b
gh-2357 FederatedStore FederatedOperation.v02 Demo fix
GCHQDev404 Jul 29, 2021
35b58b1
Merge remote-tracking branch 'origin/alpha-release/2.0.0-alpha-0.1' i…
GCHQDev404 Feb 28, 2022
2ff97cd
Merge remote-tracking branch 'origin/alpha-release/2.0.0-alpha-0.1' i…
GCHQDev404 Mar 2, 2022
e5e82a1
gh-2457 double caching issue fix for persisting graph names in tests.
GCHQDev404 Mar 2, 2022
1370a2b
gh-2357 FederatedStore FederatedOperation merge with Alpha1 fixes inc…
GCHQDev404 May 4, 2022
4b3751b
gh-2357 FederatedStore checkstyle
GCHQDev404 May 4, 2022
ce60073
Merge remote-tracking branch 'origin/v2-alpha' into gh-2357-federated…
GCHQDev404 May 5, 2022
7d5b8bd
gh-2369 Remove ChainedIterable Gaffer duplicate
GCHQDev404 May 6, 2022
19967eb
gh-2369 Dependency upgrade Koryphe 2.2.0
GCHQDev404 May 6, 2022
d868a7f
gh-2369 Deleting Duplicate Koryphe classes
GCHQDev404 May 6, 2022
a9c147a
gh-2369 Deleting Duplicate Koryphe classes updating imports
GCHQDev404 May 9, 2022
a9aab79
Updated Koryphe version to 2.2.0
t92549 May 6, 2022
826d908
Merge branch 'gh-2369-duplicate-koryphe-classes' into gh-2357-federat…
GCHQDev404 May 9, 2022
22de7cf
gh-2369 corrections
GCHQDev404 May 9, 2022
889dc44
gh-2369 corrections
GCHQDev404 May 9, 2022
a5a18e6
Fix copyright dates
GCHQDeveloper314 May 10, 2022
fe89964
gh-2369 import fix
GCHQDev404 May 10, 2022
0d688e7
Merge branch 'gh-2369-duplicate-koryphe-classes' into gh-2357-federat…
GCHQDev404 May 10, 2022
a53ea3c
gh-2357 spotless changes
GCHQDev404 May 10, 2022
d491009
gh-2357 FederatedStore FederatedOperation merging.
GCHQDev404 May 11, 2022
17c3a06
gh-2357 FederatedStore FederatedOperation temporary classes in lieu o…
GCHQDev404 May 11, 2022
d60350e
gh-2357 FederatedStore FederatedOperation javadoc
GCHQDev404 May 13, 2022
f3f67c0
gh-2357 FederatedStore FederatedOperation default merge function change.
GCHQDev404 May 18, 2022
e4d6b05
gh-2357 FederatedStore FederatedOperation FederatedOutputIterableHand…
GCHQDev404 May 18, 2022
0fe4ac6
Updated Koryphe version to 2.3.0
GCHQDev404 May 19, 2022
1dc588b
gh-2357 FederatedStore FederatedOperation default merge function change.
GCHQDev404 May 19, 2022
ac598e1
gh-2357 FederatedStore FederatedOperation tidy
GCHQDev404 May 24, 2022
1bcaf98
gh-2357 FederatedStore FederatedOperation Test improvement
GCHQDev404 May 24, 2022
1200282
gh-2357 FederatedStore deprecated
GCHQDev404 Jun 20, 2022
4dd9ccd
gh-2357 FederatedStore checkstyle
GCHQDev404 Jun 30, 2022
97beedf
gh-2357 FederatedStore TDD DefaultMerge of GetElements with View Aggr…
GCHQDev404 Jul 6, 2022
bed2eb6
gh-2357 FederatedStore spotless
GCHQDev404 Jul 7, 2022
cb86a6d
gh-2357 FederatedStore DefaultMergeFunction from util.
GCHQDev404 Jul 7, 2022
80cb0c4
gh-2357 FederatedStore DefaultMergeFunction best efforts of concat.
GCHQDev404 Jul 13, 2022
c28d20f
Merge remote-tracking branch 'origin/v2-alpha' into gh-2357-federated…
GCHQDev404 Jul 14, 2022
9593730
Merge branch 'gh-2357-federatedstore-federated-operation-merge-alpha3…
GCHQDev404 Jul 14, 2022
3f1cb1c
Merge remote-tracking branch 'origin/v2-alpha' into gh-2357-federated…
GCHQDev404 Jul 25, 2022
f1b598f
FederatedStore Alpha4 Team Review PR
GCHQDev404 Oct 5, 2022
3527374
gh-2357 FederatedStore undoing changes out of scope of gh-2357
GCHQDev404 Oct 5, 2022
5a5ddc9
gh-2357 FederatedStore spotless checkstyle
GCHQDev404 Oct 5, 2022
225d4f0
gh-2357 FederatedStore undoing changes out of scope of gh-2357 and sp…
GCHQDev404 Oct 5, 2022
26a77d9
gh-2357 FederatedStore reviewing of Todos, graphIds as List not just …
GCHQDev404 Oct 6, 2022
0e33f10
gh-2357 FederatedStore reviewing of Todos
GCHQDev404 Oct 7, 2022
8981640
Merge branch 'v2-alpha' into gh-2357-federatedstore-federated-operati…
GCHQDev404 Oct 10, 2022
8fb932e
Merge branch 'gh-2357-federated-store-todo-ticket-review' into gh-235…
GCHQDev404 Oct 10, 2022
e496607
PR merge hot fix
GCHQDev404 Oct 11, 2022
11a5748
PR merge hot fix
GCHQDev404 Oct 11, 2022
166b3c2
PR hotfix formatting
GCHQDev404 Oct 14, 2022
b174313
gh-2357 PR changes.
GCHQDev404 Oct 17, 2022
30bbcc6
gh-2357 PR changes.
GCHQDev404 Oct 17, 2022
4f42779
gh-2357 PR changes.
GCHQDev404 Oct 17, 2022
33a5cc9
gh-2357 PR changes.
GCHQDev404 Oct 18, 2022
773b296
gh-2357 PR changes.
GCHQDev404 Oct 18, 2022
d48774e
gh-2357 PR changes.
GCHQDev404 Oct 18, 2022
c46655b
gh-2357 PR changes.
GCHQDev404 Oct 18, 2022
bf75e8d
gh-2357 PR changes.
GCHQDev404 Oct 19, 2022
9263727
gh-2357 PR changes.
GCHQDev404 Oct 19, 2022
3e5739c
gh-2357 PR changes.
GCHQDev404 Oct 19, 2022
183453b
gh-2357 PR changes.
GCHQDev404 Oct 20, 2022
464e019
gh-2357 PR changes.
GCHQDev404 Oct 20, 2022
4210b56
gh-2357 Remove ToIterable, fix bracket typo
GCHQDeveloper314 Oct 20, 2022
2de6dbc
gh-2357 PR changes.
GCHQDev404 Oct 23, 2022
a7e04f4
Merge branch 'gh-2357-federatedstore-federated-operation-merge-v2-alp…
GCHQDev404 Oct 23, 2022
5efe305
gh-2357 Fix regex
GCHQDeveloper314 Oct 24, 2022
5852ecf
gh-2357 Exposing better exceptions.
GCHQDev404 Oct 24, 2022
3381237
Merge remote-tracking branch 'origin/v2-alpha' into gh-2357-federated…
GCHQDev404 Oct 24, 2022
7f2b99a
Merge branch 'gh-2357-federatedstore-federated-operation-merge-v2-alp…
GCHQDev404 Oct 25, 2022
d61eb7e
Merge remote-tracking branch 'origin/v2-alpha' into gh-2457-double-ca…
GCHQDev404 Oct 26, 2022
991f113
Merge remote-tracking branch 'origin/v2-alpha' into gh-2457-double-ca…
GCHQDev404 Oct 27, 2022
d5326d8
gh-2457 GraphSerialisable not being able to Mock has failing tests. c…
GCHQDev404 Oct 27, 2022
ecfeffe
gh-2447 Fixed GraphSerialisable equals.
GCHQDev404 Oct 27, 2022
720603a
gh-2447 need to ignore "final class" checkstyle
GCHQDev404 Oct 27, 2022
7eec033
gh-2457 checkstyle
GCHQDev404 Oct 28, 2022
6bb3655
Merge remote-tracking branch 'origin/v2-alpha' into gh-2457-double-ca…
GCHQDev404 Oct 28, 2022
2d9efa7
gh-2457 PR requests.
GCHQDev404 Oct 31, 2022
543378e
gh-2457 PR requests.
GCHQDev404 Oct 31, 2022
c51cb9c
Merge remote-tracking branch 'origin/gh-2457-double-caching-issue' in…
GCHQDev404 Oct 31, 2022
14f39de
gh-2457 PR requests.
GCHQDev404 Oct 31, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions core/cache/src/main/java/uk/gov/gchq/gaffer/cache/Cache.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2020 Crown Copyright
* Copyright 2018-2022 Crown Copyright
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -17,6 +17,7 @@
package uk.gov.gchq.gaffer.cache;

import uk.gov.gchq.gaffer.cache.exception.CacheOperationException;
import uk.gov.gchq.gaffer.core.exception.GafferRuntimeException;

import java.util.Collections;
import java.util.Set;
Expand Down Expand Up @@ -55,8 +56,17 @@ protected void addToCache(final String key, final V value, final boolean overwri
}

public Set<String> getAllKeys() {
final Set<String> allKeysFromCache = CacheServiceLoader.getService().getAllKeysFromCache(cacheName);
return (null == allKeysFromCache) ? null : Collections.unmodifiableSet(allKeysFromCache);
try {
final Set<String> allKeysFromCache;
if (CacheServiceLoader.isEnabled()) {
allKeysFromCache = CacheServiceLoader.getService().getAllKeysFromCache(cacheName);
} else {
throw new GafferRuntimeException("Cache is not enabled, check it was Initialised");
}
return (null == allKeysFromCache) ? null : Collections.unmodifiableSet(allKeysFromCache);
} catch (final Exception e) {
throw new GafferRuntimeException("Error getting all keys", e);
}
}

/**
Expand Down
30 changes: 28 additions & 2 deletions core/graph/src/main/java/uk/gov/gchq/gaffer/graph/Graph.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

import com.google.common.collect.Lists;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -447,8 +449,7 @@ public String getDescription() {
* Returns all the {@link StoreTrait}s for the contained {@link Store}
* implementation
*
* @return a {@link Set} of all of the {@link StoreTrait}s that the store
* has.
* @return a {@link Set} of all of the {@link StoreTrait}s that the store has.
*/
@Deprecated
public Set<StoreTrait> getStoreTraits() {
Expand Down Expand Up @@ -975,4 +976,29 @@ private Schema cloneSchema(final Schema schema) {
return null != schema ? schema.clone() : null;
}
}

@Override
public boolean equals(final Object o) {
if (this == o) {
return true;
}

if (o == null || getClass() != o.getClass()) {
return false;
}

final Graph graph = (Graph) o;

return new EqualsBuilder()
.append(new GraphSerialisable.Builder(this).build(), new GraphSerialisable.Builder(graph).build())
.isEquals();
}

@Override
public int hashCode() {
return new HashCodeBuilder(17, 37)
.append(store)
.append(config)
.toHashCode();
}
}
Loading