Gaffer
Gaffer copied to clipboard
Use depth limit rather than timeout on NamedOperationResolver
The NamedOperationResolver
uses a timeout to control how long it will try resolve from cache, this is to stop infinite loops due to nested operations.
A better approach for this would be to implement a depth limit instead that controls how nested into a NamedOperation
the resolver will go. This approach prevents infinite loops but also ensures the resolver succeeds under more circumstances and won't get stuck or timeout before finishing.
Originally posted by @GCHQDeveloper314 in https://github.com/gchq/Gaffer/pull/3148#discussion_r1464815898
In addition to this, there's a problem with the logs created by this code. Every time it runs the following is logged:
graph.hook.NamedOperationResolver INFO - Starting ResolverTask with timeout: 1MINUTES
graph.hook.NamedOperationResolver INFO - finished ResolverTask
These shouldn't be at INFO
level.