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 03:13:05 UTC

[GitHub] [iotdb] LebronAl opened a new pull request #3468: [Cluster] enable cacheLeader by default

LebronAl opened a new pull request #3468:
URL: https://github.com/apache/iotdb/pull/3468


   


-- 
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] sonarcloud[bot] commented on pull request #3468: [Cluster] enable cacheLeader by default

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #3468:
URL: https://github.com/apache/iotdb/pull/3468#issuecomment-872738606


   Kudos, SonarCloud Quality Gate passed!
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3468&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3468&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3468&resolved=false&types=BUG)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3468&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3468&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3468&resolved=false&types=VULNERABILITY)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3468&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3468&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=3468&resolved=false&types=SECURITY_HOTSPOT)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3468&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3468&resolved=false&types=CODE_SMELL) [3 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=3468&resolved=false&types=CODE_SMELL)
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/40.png' alt='48.8%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3468&metric=new_coverage&view=list) [48.8% Coverage](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3468&metric=new_coverage&view=list)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3468&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=3468&metric=new_duplicated_lines_density&view=list)
   
   


-- 
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] HTHou merged pull request #3468: [Cluster] enable cacheLeader by default

Posted by GitBox <gi...@apache.org>.
HTHou merged pull request #3468:
URL: https://github.com/apache/iotdb/pull/3468


   


-- 
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] neuyilan commented on a change in pull request #3468: [Cluster] enable cacheLeader by default

Posted by GitBox <gi...@apache.org>.
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



[GitHub] [iotdb] coveralls edited a comment on pull request #3468: [Cluster] enable cacheLeader by default

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #3468:
URL: https://github.com/apache/iotdb/pull/3468#issuecomment-870218080


   
   [![Coverage Status](https://coveralls.io/builds/41066946/badge)](https://coveralls.io/builds/41066946)
   
   Coverage decreased (-0.03%) to 67.906% when pulling **a6e5600c547839654ef5b1f3facf85ea2393fd22 on enable_cache_leader** into **38149a4fdb88c3480db8a2626c865235d727976c on master**.
   


-- 
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] coveralls edited a comment on pull request #3468: [Cluster] enable cacheLeader by default

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #3468:
URL: https://github.com/apache/iotdb/pull/3468#issuecomment-870218080


   
   [![Coverage Status](https://coveralls.io/builds/40990010/badge)](https://coveralls.io/builds/40990010)
   
   Coverage increased (+0.03%) to 67.166% when pulling **5bf75f655090670bc578d4161200602191957f4a on enable_cache_leader** into **4a6f4b04d3e83fa76f16816f6dffd0cd6e02578c on master**.
   


-- 
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] coveralls commented on pull request #3468: [Cluster] enable cacheLeader by default

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #3468:
URL: https://github.com/apache/iotdb/pull/3468#issuecomment-870218080


   
   [![Coverage Status](https://coveralls.io/builds/40954432/badge)](https://coveralls.io/builds/40954432)
   
   Coverage remained the same at 67.148% when pulling **bd2d839031356d3e2df8b72ec1cbda7068f39ede on enable_cache_leader** into **139c6bab7b295042636c2d3c36187b8935e13358 on master**.
   


-- 
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] neuyilan commented on a change in pull request #3468: [Cluster] enable cacheLeader by default

Posted by GitBox <gi...@apache.org>.
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



[GitHub] [iotdb] coveralls edited a comment on pull request #3468: [Cluster] enable cacheLeader by default

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #3468:
URL: https://github.com/apache/iotdb/pull/3468#issuecomment-870218080


   
   [![Coverage Status](https://coveralls.io/builds/41033141/badge)](https://coveralls.io/builds/41033141)
   
   Coverage increased (+0.04%) to 67.971% when pulling **8781ee98ba2463c8691f5b00f5c96da14ce62d2a on enable_cache_leader** into **b44915da9caf6473b0edb6b753c5d38feedab951 on master**.
   


-- 
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] coveralls commented on pull request #3468: [Cluster] enable cacheLeader by default

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #3468:
URL: https://github.com/apache/iotdb/pull/3468#issuecomment-870218080


   
   [![Coverage Status](https://coveralls.io/builds/40954432/badge)](https://coveralls.io/builds/40954432)
   
   Coverage remained the same at 67.148% when pulling **bd2d839031356d3e2df8b72ec1cbda7068f39ede on enable_cache_leader** into **139c6bab7b295042636c2d3c36187b8935e13358 on master**.
   


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