[ https://issues.apache.org/jira/browse/TINKERPOP-1761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16165813#comment-16165813 ]
ASF GitHub Bot commented on TINKERPOP-1761: ------------------------------------------- Github user ko-mueller commented on the issue: https://github.com/apache/tinkerpop/pull/709 Alright, it just would be nice to have this fixed in the next release. I didn't upgrade from 3.2.5 to 3.3.0 because of this. It's not a big issue for me right now, just that I'd like to stay current (without implementing a work-around for this). > GremlinExecutor: Timeout future not cancelled on successful script evaluation > ----------------------------------------------------------------------------- > > Key: TINKERPOP-1761 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1761 > Project: TinkerPop > Issue Type: Bug > Components: groovy > Affects Versions: 3.2.6 > Reporter: Konstantin Müller > > This bug seems to be introduced by TINKERPOP-1714. The timeout future in > GremlinExecutor.eval() is not cancelled when the evaluation future is > completed successfully before the timeout (lines 304ff). This was done > correctly before the changes introduced by TINKERPOP-1714. Code to reproduce: > {code:java} > try (GremlinExecutor executor = > GremlinExecutor.build().scriptEvaluationTimeout(15_000).create()) { > executor.eval("1+1").get(); > } catch (Exception e) { > // NOOP > } > {code} > When the code leaves the try-block it calls GremlinExecutor.close() which > will clean up executorService and scheduledExecutorService, but because the > timeout future is not cancelled this will hang until the future is finished > (here 15s). > Workaround: Provide an own ExecutorService when constructing a > GremlinExecutor instance and cancel all tasks when the script evaluation is > finished successfully. -- This message was sent by Atlassian JIRA (v6.4.14#64029)