QiuYucheng2003 opened a new issue, #2939: URL: https://github.com/apache/incubator-hugegraph/issues/2939
### Bug Type (问题类型) logic (逻辑设计问题) ### Before submit - [x] 我已经确认现有的 [Issues](https://github.com/apache/hugegraph/issues) 与 [FAQ](https://hugegraph.apache.org/docs/guides/faq/) 中没有相同 / 重复问题 (I have confirmed and searched that there are no similar problems in the historical issue and documents) ### Environment (环境信息) Server Version: N/A (Found in Source Code Analysis / Master Branch) Backend: N/A OS: N/A Data Size: N/A ### Expected & Actual behavior (期望与实际表现) Expected Behavior: When Consumers threads encounter a critical error (e.g., inside ContextCallable initialization or an Error that escapes the internal try-catch), the exception should be logged or propagated to the UncaughtExceptionHandler to alert the system. Actual Behavior: In Consumers.java, tasks are submitted using executor.submit(...) (Line 110), but the returned Future is never checked (no future.get() is called in await() or elsewhere). This causes a "swallowed exception" scenario: 1. Exceptions occurring outside the runAndDone() internal try-catch block (e.g., in ContextCallable wrapper or strictly internal JVM errors) are captured by the Future. 2. Since the Future is ignored, these exceptions remain invisible. The system believes the consumer is running, but the thread may have terminated silently. Code / Logs: // Consumers.java public void start(String name) { // ... for (int i = 0; i < this.workers; i++) { // Problem: 'submit' is used but the returned Future is never checked via .get() // If an exception happens outside runAndDone's try-catch, it is swallowed. this.runningFutures.add( this.executor.submit(new ContextCallable<>(this::runAndDone))); } } Recommendation: Change submit() to execute() if the return value is not needed, which allows the JVM's UncaughtExceptionHandler to catch unhandled exceptions. Or ensure future.get() is checked during the lifecycle management. ### Vertex/Edge example (问题点 / 边数据举例) ```javascript N/A ``` ### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构) ```javascript N/A ``` -- 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]
