Skip to content

Consider TTL of device in Region scan for active data#12890

Merged
JackieTien97 merged 8 commits intomasterfrom
ttlInActive
Jul 12, 2024
Merged

Consider TTL of device in Region scan for active data#12890
JackieTien97 merged 8 commits intomasterfrom
ttlInActive

Conversation

@ycycse
Copy link
Copy Markdown
Member

@ycycse ycycse commented Jul 9, 2024

Data may remains in database even if it's out-dated due to the TTL. We need to filter such data in region scan.

Different from series scan which contains only one device which can use the TTL info of that device to update timeFilter,
a lot of devices share the same timeFilter in region scan.

So we can't update the timeFilter in advance, we need to calculate the real time range by TTL of the specified device one by one. In such procedure, we can use some cache technology to reduce the cost.

In this PR, we use a new timeFilter TimeFilterForDeviceTTL to replace the original timeFilter for above purpose.

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 9, 2024

Codecov Report

Attention: Patch coverage is 0% with 58 lines in your changes missing coverage. Please review.

Project coverage is 41.71%. Comparing base (cbfaca6) to head (2be87c0).
Report is 9 commits behind head on master.

Files Patch % Lines
.../apache/iotdb/db/utils/TimeFilterForDeviceTTL.java 0.00% 24 Missing ⚠️
...ueryengine/plan/planner/OperatorTreeGenerator.java 0.00% 12 Missing ⚠️
...operator/source/RegionScanForActiveDeviceUtil.java 0.00% 8 Missing ⚠️
...or/source/AbstractRegionScanForActiveDataUtil.java 0.00% 6 Missing ⚠️
...ator/source/RegionScanForActiveTimeSeriesUtil.java 0.00% 6 Missing ⚠️
...perator/source/ActiveDeviceRegionScanOperator.java 0.00% 1 Missing ⚠️
...tor/source/ActiveTimeSeriesRegionScanOperator.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #12890      +/-   ##
============================================
- Coverage     41.72%   41.71%   -0.02%     
  Complexity       71       71              
============================================
  Files          3319     3323       +4     
  Lines        210010   210091      +81     
  Branches      24965    24967       +2     
============================================
+ Hits          87622    87631       +9     
- Misses       122388   122460      +72     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@ycycse ycycse requested a review from JackieTien97 July 11, 2024 02:41
@JackieTien97 JackieTien97 merged commit 821f528 into master Jul 12, 2024
@JackieTien97 JackieTien97 deleted the ttlInActive branch July 12, 2024 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants