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 2021/03/09 07:51:13 UTC

[GitHub] [iotdb] LebronAl commented on pull request #2782: [IOTDB-1189] [Distributed]optimize thread pool client close

LebronAl commented on pull request #2782:
URL: https://github.com/apache/iotdb/pull/2782#issuecomment-793500917


   > I try to change nodeClientNumMap.put(node, nodeClientNum + 1); to nodeClientNumMap.computeIfPresent(node, (n, oldValue) -> oldValue + 1); in waitForClient, and change nodeClientNumMap.put(node, nodeClientNum); to nodeClientNumMap.computeIfPresent(node, (n, oldValue) -> oldValue - 1); in putClient, and then I can pass your newly-added concurrent test below. So maybe just change these two line will be enough?
   
   It seems we should change these two places at least, and after these changes we may remove the unused parameter 'NodeClientNum' in some functions, last but not least , maybe we can copy the UT there too.
   


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

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