Gaffer icon indicating copy to clipboard operation
Gaffer copied to clipboard

HasTraitsHandler remove reference to FederatedStore Flag

Open GCHQDev404 opened this issue 3 years ago • 1 comments

This was a TEMPORARY fix added to the Handler to avoid a bug. The FederatedStore places a flag in the operations options to detect infinite loops. The HasTraitsHandler currently copies all options to a new GetTraitsOperations this would cause an incorrect identification of a loop.

https://github.com/gchq/Gaffer/pull/2574

GCHQDev404 avatar Jan 26 '22 16:01 GCHQDev404

The temporary fix in the HasTraitHandler looks like this: https://github.com/gchq/Gaffer/blob/40bb337d2ca91fea2dadcd04cddec46021c169ee/core/store/src/main/java/uk/gov/gchq/gaffer/store/operation/handler/HasTraitHandler.java#L35-L44

This needs a better long term solution. This potential bug (where the flag wasn't checked) was caught by @GCHQDev404 in a review, but it should have been caught by tests. Perhaps testing that every Operation can run without causing a loop bug would be good?

t92549 avatar Jan 28 '22 12:01 t92549

See my comment in 2812 (closed duplicate of this) for some more info on this.

GCHQDeveloper314 avatar Jul 04 '23 09:07 GCHQDeveloper314