jixuan1989 commented on a change in pull request #2689:
URL: https://github.com/apache/iotdb/pull/2689#discussion_r578862169



##########
File path: 
server/src/main/java/org/apache/iotdb/db/engine/cache/LRULinkedHashMap.java
##########
@@ -55,7 +55,7 @@
   protected long averageSize = 0;
 
   public LRULinkedHashMap(long maxMemory) {
-    this.linkedHashMap = new LinkedHashMap<>(INITIAL_CAPACITY, 
LOAD_FACTOR_MAP);

Review comment:
       1. but why not use `removeEldestEntry `? 
   Can calculating the size in `put` bring any benefit ?
   
   2. About added UT:
   
   The UT does not take effect. Even you do not modify `LRULinkedHashMap.java` 
and only add your UT codes, the UT can also pass, which means the UT does not 
cover the incorrection of the original `LRULinkedHashMap.java`.




----------------------------------------------------------------
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:
[email protected]


Reply via email to