shuwenwei commented on code in PR #15257:
URL: https://github.com/apache/iotdb/pull/15257#discussion_r2050437273
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/selector/estimator/AbstractCompactionEstimator.java:
##########
@@ -99,31 +131,37 @@ private FileInfo getFileInfoFromCache(TsFileResource
resource) throws IOExceptio
if (fileInfoCache.containsKey(resource)) {
return fileInfoCache.get(resource);
}
- File file = new File(resource.getTsFilePath());
+ TsFileID tsFileID = resource.getTsFileID();
synchronized (globalFileInfoCacheForFailedCompaction) {
- if (globalFileInfoCacheForFailedCompaction.containsKey(file)) {
- FileInfo fileInfo = globalFileInfoCacheForFailedCompaction.get(file);
+ FileInfo fileInfo = globalFileInfoCacheForFailedCompaction.get(tsFileID);
+ if (fileInfo != null) {
fileInfoCache.put(resource, fileInfo);
return fileInfo;
}
Review Comment:
No, because this extra fileInfoCache is only used temporarily within a task
selection.
--
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]