qy-liuhuo opened a new pull request, #11099:
URL: https://github.com/apache/inlong/pull/11099

   
   <!-- Prepare a Pull Request
   Change the title of pull request refer to the following example:
     [INLONG-XYZ][Component] Title of the pull request 
   -->
   
   <!-- Specify the issue this pull request going to fix.
   The following *XYZ* should be replaced by the actual [GitHub 
Issue](https://github.com/apache/inlong/issues) number)-->
   
   Fixes #11071 
   
   ### Motivation
   
   When the dataproxy module requests the 
`/dataproxy/getIpList/inlong_agent_system` interface, an error occurs because 
there is no record in the `inlong_group` table where the `inlong_group_id` is 
equals to `inlong_agent_system`. This results in the manager console 
continuously outputting exceptions
   
   ### Modifications
   
   <!--Describe the modifications you've done.-->
   
   - Changed getDataProxyNodes function in the 
`org/apache/inlong/manager/service/cluster/InlongClusterServiceImpl.java` file 
to throw an exception when there is no record in the `inlong_group` table where 
the `inlong_group_id` is equals to `inlong_agent_system`
   
   - Changed getIpList function in the 
`org/apache/inlong/manager/web/controller/openapi/DataProxyController.java` 
file to return fail response when an exception occurs in the 
`getDataProxyNodes` function. 
   
   
   ### Verifying this change
   
   Previous error message:
   
   ```
   [ ] 2024-09-09 14:26:04.467 -ERROR [http-nio-8083-exec-5] 
w.c.ControllerExceptionHandler:152 - failed to handle request on path: 
/inlong/manager/openapi/dataproxy/getIpList/inlong_agent_system by user: admin 
   2024-09-09T14:26:04.608632436Z java.lang.NullPointerException: null
   2024-09-09T14:26:04.608639991Z       at 
org.apache.inlong.manager.service.cluster.InlongClusterServiceImpl.getDataProxyNodes(InlongClusterServiceImpl.java:913)
 ~[manager-service-1.14.0-SNAPSHOT.jar:1.14.0-SNAPSHOT]
   2024-09-09T14:26:04.608655587Z       at 
org.apache.inlong.manager.service.cluster.InlongClusterServiceImpl$$FastClassBySpringCGLIB$$5ac56ec1.invoke(<generated>)
 ~[manager-service-1.14.0-SNAPSHOT.jar:1.14.0-SNAPSHOT]
   ...
   ...
   ```
   Current error log:
   
   ```
   2024-09-13T11:43:02.098668598Z [ ] 2024-09-13 11:43:01.248 -ERROR 
[http-nio-8083-exec-3] m.s.c.InlongClusterServiceImpl:915 - group not found by 
groupId=inlong_agent_system 
   ```
   


-- 
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: commits-unsubscr...@inlong.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to