-
Notifications
You must be signed in to change notification settings - Fork 353
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
Conversation
…TION_OPTIONS_GRAPH_IDS.
…aining MIDPUT generic
…federatedstore-federated-operation-remove-midput # Conflicts: # store-implementation/federated-store/src/main/java/uk/gov/gchq/gaffer/federatedstore/operation/FederatedOperation.java
… to IFederation
…ingAdminUsage changes.
…ingAdminUsage rename.
…hanging GraphSerialisable causes backwards compatability issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see quite a few comments of TODO FS
. Could it be clarified if this PR is ready for merge? Some of the comment do look like they can be addressed later.
Instead of leaving these comments in the code, a follow up issue could be raised - especially for the comments in the tests.
} catch (final Exception e) { | ||
throw new StorageException("Error adding graph " + graphId + " to storage due to: " + e.getMessage(), e); | ||
throw new StorageException("Error adding graph " + graphId + (nonNull(e.getMessage()) ? (" to storage due to: " + e.getMessage()) : "."), e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using String.Format
would be better than concatenation.
...ion/federated-store/src/main/java/uk/gov/gchq/gaffer/federatedstore/FederatedStoreCache.java
Outdated
Show resolved
Hide resolved
These are left in for when I'm showing team the code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No comments requiring changes, therefore approved.
public static final boolean DEFAULT_DISABLED_BY_DEFAULT = false; | ||
public static final String ERROR_ADDING_GRAPH_TO_CACHE = "Error adding graph, GraphId is known within the cache, but %s is different. GraphId: %s"; | ||
public static final String USER_IS_ATTEMPTING_TO_OVERWRITE = "User is attempting to overwrite a graph within FederatedStore. GraphId: %s"; | ||
public static final String ACCESS_IS_NULL = "Can not put graph into storage without a FederatedAccess key."; | ||
public static final String GRAPH_IDS_NOT_VISIBLE = "The following graphIds are not visible or do not exist: %s"; | ||
private final Map<FederatedAccess, Set<Graph>> storage = new HashMap<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have there been any tests to see how much removing the local cache impacts performance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
none.
but the code was written so that the graph creation from GraphSerialisable happens in the last moment to where an operation actually requires execution.
Its possible that a transient Graph object could be placed in the GraphSerialisable but a code review would be required to work out how many times a GraphSerialisable object gets re-used.
Related Issue