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/06/29 05:15:09 UTC

[GitHub] [iotdb] neuyilan commented on a change in pull request #3468: [Cluster] enable cacheLeader by default

neuyilan commented on a change in pull request #3468:
URL: https://github.com/apache/iotdb/pull/3468#discussion_r660286454



##########
File path: session/src/main/java/org/apache/iotdb/session/Session.java
##########
@@ -679,7 +679,9 @@ private void insertRecord(String deviceId, TSInsertStringRecordReq request)
 
   private SessionConnection getSessionConnection(String deviceId) {
     EndPoint endPoint;
-    if (enableCacheLeader && (endPoint = deviceIdToEndpoint.get(deviceId)) != null) {
+    if (enableCacheLeader
+        && deviceIdToEndpoint.size() != 0

Review comment:
       use `deviceIdToEndpoint.isEmpty()`?




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