You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/06/21 07:50:19 UTC

[GitHub] [iotdb] cmlmakahts opened a new pull request, #6360: [IOTDB-3582] Fix client connections leak caused by delete storage group

cmlmakahts opened a new pull request, #6360:
URL: https://github.com/apache/iotdb/pull/6360

   Use try-with-resources to return client


-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] cmlmakahts commented on a diff in pull request #6360: [IOTDB-3582] Fix client connections leak caused by delete storage group

Posted by GitBox <gi...@apache.org>.
cmlmakahts commented on code in PR #6360:
URL: https://github.com/apache/iotdb/pull/6360#discussion_r902362529


##########
confignode/src/main/java/org/apache/iotdb/confignode/client/SyncDataNodeClientPool.java:
##########
@@ -57,10 +57,8 @@ private SyncDataNodeClientPool() {
 
   public TSStatus invalidatePartitionCache(
       TEndPoint endPoint, TInvalidateCacheReq invalidateCacheReq) {
-    SyncDataNodeInternalServiceClient client;
     TSStatus status;
-    try {
-      client = clientManager.borrowClient(endPoint);
+    try (SyncDataNodeInternalServiceClient client = clientManager.borrowClient(endPoint)){

Review Comment:
   Fixed



-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] wangchao316 commented on a diff in pull request #6360: [IOTDB-3582] Fix client connections leak caused by delete storage group

Posted by GitBox <gi...@apache.org>.
wangchao316 commented on code in PR #6360:
URL: https://github.com/apache/iotdb/pull/6360#discussion_r902273469


##########
confignode/src/main/java/org/apache/iotdb/confignode/client/SyncDataNodeClientPool.java:
##########
@@ -57,10 +57,8 @@ private SyncDataNodeClientPool() {
 
   public TSStatus invalidatePartitionCache(
       TEndPoint endPoint, TInvalidateCacheReq invalidateCacheReq) {
-    SyncDataNodeInternalServiceClient client;
     TSStatus status;
-    try {
-      client = clientManager.borrowClient(endPoint);
+    try (SyncDataNodeInternalServiceClient client = clientManager.borrowClient(endPoint)){

Review Comment:
   ){ 
   space.



-- 
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: reviews-unsubscribe@iotdb.apache.org

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


[GitHub] [iotdb] wangchao316 merged pull request #6360: [IOTDB-3582] Fix client connections leak caused by delete storage group

Posted by GitBox <gi...@apache.org>.
wangchao316 merged PR #6360:
URL: https://github.com/apache/iotdb/pull/6360


-- 
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: reviews-unsubscribe@iotdb.apache.org

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