iotdb icon indicating copy to clipboard operation
iotdb copied to clipboard

Change FileTimeIndexCache to region level

Open HTHou opened this issue 1 year ago • 2 comments

Description

FileTimeIndexCache may open too much file if there is too much time partitions.

HTHou avatar Aug 30 '24 04:08 HTHou

Codecov Report

Attention: Patch coverage is 44.00000% with 42 lines in your changes missing coverage. Please review.

Project coverage is 40.98%. Comparing base (c547916) to head (4a15df7). Report is 14 commits behind head on master.

Files with missing lines Patch % Lines
...n/tsfile/timeindex/FileTimeIndexCacheRecorder.java 32.50% 27 Missing :warning:
.../iotdb/db/storageengine/dataregion/DataRegion.java 52.00% 12 Missing :warning:
...s/fileTimeIndexCache/FileTimeIndexCacheReader.java 0.00% 2 Missing :warning:
...storageengine/dataregion/tsfile/TsFileManager.java 0.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff            @@
##             master   #13353   +/-   ##
=========================================
  Coverage     40.97%   40.98%           
  Complexity       71       71           
=========================================
  Files          3929     3929           
  Lines        242315   242308    -7     
  Branches      29251    29248    -3     
=========================================
+ Hits          99296    99308   +12     
+ Misses       143019   143000   -19     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Aug 30 '24 09:08 codecov[bot]

One potential improvement: the compaction task clears the cache file at first. If a restart happens at that time, there will be no available cache file for this restart, and the system may suffer from a long restart time. Maybe it would be better to adopt the write-a-temp-file-and-replace method.

jt2594838 avatar Sep 02 '24 01:09 jt2594838