[AINode] More accurate exceptions#17061
Merged
CRZbulabula merged 2 commits intoapache:masterfrom Jan 23, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a dedicated AINodeConnectionException to replace generic exception handling when connecting to AINode fails, improving exception clarity and consistency across the codebase. It also adds validation to prevent duplicate device IDs in load/unload model operations.
Changes:
- Created new
AINodeConnectionExceptionclass with a descriptive error message for AINode connection failures - Replaced generic
IoTDBRuntimeExceptionandModelInferenceProcessExceptionwithAINodeConnectionExceptionin multiple AINode client interaction points - Added duplicate device ID validation in Python handler for load/unload model operations with corresponding error codes (1509, 1510)
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
AINodeConnectionException.java |
New exception class for AINode connection failures with standardized error message |
UDTFForecast.java |
Replaced generic exception with AINodeConnectionException in forecast method |
ForecastTableFunction.java |
Replaced generic exception with AINodeConnectionException in forecast method and removed unused import |
ClassifyTableFunction.java |
Replaced generic exception with AINodeConnectionException in classify method and removed unused import |
ClusterConfigTaskExecutor.java |
Replaced generic exceptions with AINodeConnectionException in 8 model management methods |
InferenceOperator.java |
Replaced ModelInferenceProcessException with AINodeConnectionException in inference task submission |
handler.py |
Added duplicate device ID validation for loadModel and unloadModel operations |
constant.py |
Added new error codes LOAD_MODEL_ERROR (1509) and UNLOAD_MODEL_ERROR (1510) |
AINodeInstanceManagementIT.java |
Added integration tests for duplicate device ID validation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...rg/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
Outdated
Show resolved
Hide resolved
...rg/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
Outdated
Show resolved
Hide resolved
...rg/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
Outdated
Show resolved
Hide resolved
...rg/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
Outdated
Show resolved
Hide resolved
...rg/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
Outdated
Show resolved
Hide resolved
...rg/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
Outdated
Show resolved
Hide resolved
...rg/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
Outdated
Show resolved
Hide resolved
...in/java/org/apache/iotdb/db/queryengine/execution/operator/process/ai/InferenceOperator.java
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pr adds more accurate exceptions for AINode.