Alchuang22-dev opened a new pull request, #16642:
URL: https://github.com/apache/iotdb/pull/16642

   ## Description
   
   - Currently Updating
   
   - Should be reviewed by @CRZbulabula 
   
   This PR will refactor the AI model management and inference workflow to 
remove unnecessary dependencies on the ConfigNode for AI-related operations.
   
   Previously, all AI tasks (such as model loading, inference, and training) 
were routed through the ConfigNodeClient before reaching the AINode, causing 
redundant RPC hops and tight coupling between DataNode and ConfigNode.
   
   With this change:
   
   - DataNode now communicates directly with AINode for all AI-related 
requests, including model loading/unloading, training, inference, and device 
queries.
   
   - `ModelFetcher` no longer retrieves AINode endpoints via 
`ConfigNode.getModelInfo`; instead, it resolves AINode addresses locally from 
configuration or environment variables.
   
   - `ClusterConfigTaskExecutor` now calls `AINodeClient` directly instead of 
routing through `ConfigNodeClient`.
   
   - AI-related methods in `ConfigNodeClient` are marked as deprecated and 
throw exceptions to prevent accidental use.
   
   - Database-related operations that require ConfigNode coordination (e.g., 
`createModel`, `dropModel`, `updateModelInfo`) remain unchanged.
   
   This update effectively turns the DataNode into an independent AI 
infrastructure layer, improving performance and simplifying the AI service 
architecture while keeping core database management logic intact.
   
   <hr>
   
   This PR has:
   - [x] been self-reviewed.
       - [ ] concurrent read
       - [ ] concurrent write
       - [ ] concurrent read and write 
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] added Javadocs for most classes and all non-trivial methods. 
   - [ ] added or updated version, __license__, or notice information
   - [ ] added comments explaining the "why" and the intent of the code 
wherever would not be obvious 
     for an unfamiliar reader.
   - [ ] added unit tests or modified existing tests to cover new code paths, 
ensuring the threshold 
     for code coverage.
   - [ ] added integration tests.
   - [ ] been tested in a test IoTDB cluster.
   
   <!-- Check the items by putting "x" in the brackets for the done things. Not 
all of these items 
   apply to every PR. Remove the items which are not done or not relevant to 
the PR. None of the items 
   from the checklist above are strictly necessary, but it would be very 
helpful if you at least 
   self-review the PR. -->
   
   <hr>
   
   **The PR will change**:
   
   - `ClusterConfigTaskExecutor.java`
   - `ModelManager.java`
   - `ModelFetcher.java`
   - Other critical files
   


-- 
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]

Reply via email to