LeiRui commented on a change in pull request #262: [IOTDB-144]meta data cache for query URL: https://github.com/apache/incubator-iotdb/pull/262#discussion_r306186002
########## File path: iotdb/src/main/java/org/apache/iotdb/db/engine/cache/TsFileMetaDataCache.java ########## @@ -31,67 +32,113 @@ public class TsFileMetaDataCache { private static final Logger logger = LoggerFactory.getLogger(TsFileMetaDataCache.class); + private static final IoTDBConfig config = IoTDBDescriptor.getInstance().getConfig(); + + private static final long MEMORY_THRESHOLD_IN_B = (long) (0.25 * config + .getAllocateMemoryForRead()); /** - * key: The file seriesPath of tsfile. + * key: Tsfile path. value: TsFileMetaData */ - private ConcurrentHashMap<String, TsFileMetaData> cache; + private LruLinkedHashMap<String, TsFileMetaData> cache; private AtomicLong cacheHintNum = new AtomicLong(); Review comment: Hit ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services