javeme commented on code in PR #2641:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2641#discussion_r1720597746


##########
hugegraph-pd/hg-pd-common/src/main/java/org/apache/hugegraph/pd/common/GraphCache.java:
##########
@@ -39,7 +41,7 @@ public class GraphCache {
     private ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
     private Map<Integer, AtomicBoolean> state = new ConcurrentHashMap<>();
     private Map<Integer, Partition> partitions = new ConcurrentHashMap<>();
-    private RangeMap<Long, Integer> range = TreeRangeMap.create();
+    private RangeMap<Long, Integer> range = new SynchronizedRangeMap<Long, 
Integer>().rangeMap;

Review Comment:
   nice catch



##########
hugegraph-pd/hg-pd-common/src/main/java/org/apache/hugegraph/pd/common/GraphCache.java:
##########
@@ -39,7 +41,7 @@ public class GraphCache {
     private ReentrantReadWriteLock lock = new ReentrantReadWriteLock();

Review Comment:
   @imbajin Can we improve and avoid this lombok.Data programming style in the 
future, which will cause internal members to be modified arbitrarily by 
external class?



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