YvCeung commented on code in PR #7684:
URL: https://github.com/apache/incubator-seata/pull/7684#discussion_r2435307911


##########
discovery/seata-discovery-namingserver/src/main/java/org/apache/seata/discovery/registry/namingserver/NamingserverRegistryServiceImpl.java:
##########
@@ -230,8 +227,9 @@ public void doRegister(Instance instance, List<String> 
urlList) throws Retryable
             }
             header.put(HTTP.CONTENT_TYPE, 
ContentType.APPLICATION_JSON.getMimeType());
 
-            try (CloseableHttpResponse response = HttpClientUtil.doPost(url, 
jsonBody, header, 3000)) {
-                int statusCode = response.getStatusLine().getStatusCode();
+            try {
+                HttpResult httpResult = 
Http1HttpExecutor.getInstance().doPost(url, jsonBody, header, 3000);

Review Comment:
   > It feels awkward to retrieve an object through the implementation’s 
getInstance() when we already have an abstraction.
   
   It’s currently unclear whether Seata’s internal namingServer requires 
server-side version compatibility checks when operating over HTTP/2.
   
   If such checks are unnecessary, this logic can be simplified to use the 
abstract class’s generic API directly.
   However, if the server’s protocol version must still be validated, this 
issue essentially aligns with the scenario described above — meaning that 
server-side version detection should be integrated into the dependency checking 
mechanism.



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

Reply via email to