[
https://issues.apache.org/jira/browse/IOTDB-2907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17528182#comment-17528182
]
Jialin Qiao commented on IOTDB-2907:
------------------------------------
Hi [~tsaitsunghan] , yes, a global cache manager may be needed, better before
Storage Group is created
> Improve cache management
> ------------------------
>
> Key: IOTDB-2907
> URL: https://issues.apache.org/jira/browse/IOTDB-2907
> Project: Apache IoTDB
> Issue Type: Improvement
> Reporter: Jialin Qiao
> Priority: Minor
>
> Currently, we have TimeseriesMetadataCache, ChunkMetadataCache, ChunkCache,
> and BloomFilterCache.
> These caches usually bind cached entries with specified TsFiles.
> When deleting and recreating the storage group, the version of TsFile is
> reused, which may cause a cached entry inconsistent with data on the disk,
> thus causing bugs in the query.
>
> A potential solution:
> We need to manage all caches in system by an ICache interface containing
> clearWhenDeleteSG(String sgName). When adding a cache, it should implement
> ICache and register in the system. Then, deleting storage group could remove
> all registered Cache.
>
--
This message was sent by Atlassian Jira
(v8.20.7#820007)