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

RemoveGraph errors when graphId does not exist #2880

Closed
t92549 opened this issue Feb 7, 2023 · 1 comment · Fixed by #2898
Closed

RemoveGraph errors when graphId does not exist #2880

t92549 opened this issue Feb 7, 2023 · 1 comment · Fixed by #2898
Assignees
Labels
bug Confirmed or suspected bug federated-store Specific to/touches the federated-store module

Comments

@t92549
Copy link
Contributor

t92549 commented Feb 7, 2023

Describe the bug
RemoveGraph returns a 500 on the rest api when graphId does not exist

Expected behavior
Gaffer 1 would return false if a graph was not deleted, rather than error. It still returns true if it was deleted

Stack trace and errors

Caused by: uk.gov.gchq.gaffer.operation.OperationException: Error removing graph: AccumuloStoreEnt
        at uk.gov.gchq.gaffer.federatedstore.operation.handler.impl.FederatedRemoveGraphHandler.doOperation(FederatedRemoveGraphHandler.java:48)
        at uk.gov.gchq.gaffer.federatedstore.operation.handler.impl.FederatedRemoveGraphHandler.doOperation(FederatedRemoveGraphHandler.java:40)
        at uk.gov.gchq.gaffer.store.Store.handleOperation(Store.java:966)
        at uk.gov.gchq.gaffer.store.operation.handler.OperationChainHandler.doOperation(OperationChainHandler.java:49)
        at uk.gov.gchq.gaffer.store.operation.handler.OperationChainHandler.doOperation(OperationChainHandler.java:37)
        at uk.gov.gchq.gaffer.store.Store.handleOperation(Store.java:966)
        at uk.gov.gchq.gaffer.store.Store.execute(Store.java:389)
        at uk.gov.gchq.gaffer.store.Store.execute(Store.java:383)
        at uk.gov.gchq.gaffer.graph.Graph._execute(Graph.java:338)
        at uk.gov.gchq.gaffer.graph.Graph.execute(Graph.java:188)
        at uk.gov.gchq.gaffer.rest.service.v2.AbstractOperationService._execute(AbstractOperationService.java:97)
        ... 55 more
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
        at uk.gov.gchq.gaffer.federatedstore.FederatedStoreCache.getAccessFromCache(FederatedStoreCache.java:127)
        at uk.gov.gchq.gaffer.federatedstore.FederatedGraphStorage.remove(FederatedGraphStorage.java:190)
        at uk.gov.gchq.gaffer.federatedstore.FederatedGraphStorage.remove(FederatedGraphStorage.java:182)
        at uk.gov.gchq.gaffer.federatedstore.FederatedStore.remove(FederatedStore.java:293)
        at uk.gov.gchq.gaffer.federatedstore.operation.handler.impl.FederatedRemoveGraphHandler.doOperation(FederatedRemoveGraphHandler.java:46)
        ... 65 more
Caused by: java.lang.NullPointerException
        at uk.gov.gchq.gaffer.federatedstore.FederatedStoreCacheTransient.getAccessFromCache(FederatedStoreCacheTransient.java:117)
        at uk.gov.gchq.gaffer.federatedstore.FederatedStoreCache.getAccessFromCache(FederatedStoreCache.java:124)
        ... 69 more
@t92549 t92549 added bug Confirmed or suspected bug federated-store Specific to/touches the federated-store module labels Feb 7, 2023
@t92549 t92549 added this to the v2.0.0-alpha-0.5 milestone Feb 7, 2023
@GCHQDev404 GCHQDev404 linked a pull request Feb 21, 2023 that will close this issue
t92549 pushed a commit that referenced this issue Feb 22, 2023
Co-authored-by: GCHQDev404 <GCHQDev404@users.noreply.github.com>
@t92549
Copy link
Contributor Author

t92549 commented Feb 22, 2023

Closed by #2898

@t92549 t92549 closed this as completed Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed or suspected bug federated-store Specific to/touches the federated-store module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants