bitflicker64 commented on code in PR #818:
URL:
https://github.com/apache/hugegraph-toolchain/pull/818#discussion_r4267202742
##########
hugegraph-hubble/hubble-be/src/main/java/org/apache/hugegraph/config/AsyncConfig.java:
##########
@@ -29,13 +30,13 @@
@EnableAsync
public class AsyncConfig implements AsyncConfigurer {
+ @Bean
Review Comment:
Important: A load task still waiting in the executor queue at shutdown now
hangs context close in `LoadTask.stop()`.
With 8 imports running, a 9th dispatched import sits in the queue (core 8,
queue 1024) but is already in `runningTaskContainer` as RUNNING. This `@Bean`
is registered after the component-scanned `HubbleDisposableBean`, so it is
destroyed first, and its `shutdownNow()` (default
`waitForTasksToCompleteOnShutdown=false`) drops the queued task.
`HubbleDisposableBean.destroy()` -> `pauseAllTasks()` -> `pause()` ->
`LoadTask.stop()` then loops on `while (!this.finished)` and ignores
interrupts, so shutdown blocks until `stop-hubble.sh` kills the JVM and PAUSED
is never written. A minimal context with this config showed the queued task
never ran. This is one more reason to pause tasks before the executor stops, as
the earlier review already asks; please include a queued task in that test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]