Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract common utils used to preload segments for future reuse #14161

Merged
merged 2 commits into from
Oct 4, 2024

Conversation

klsince
Copy link
Contributor

@klsince klsince commented Oct 3, 2024

Extract common utils from preloading upsert tables, as they can be reused for dedup table as well. Preloading dedup and upsert segments is similar, as only writes are needed, w/o costly checks of metadata.

This PR refactored upsert preloading, pretty mechanically. Preloading dedup table will be added in following PRs.

if (isOutOfMetadataTTL(segment)) {
_logger.info("Skip removing segment: {} because it's out of TTL", segmentName);
skipRemoveMetadata = true;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a quick fix not quite related to the refactoring on preloading. Basically, move the check into try-catch in case isOutOfMetadataTTL throws exception, which should be rare but just in case.

@codecov-commenter
Copy link

codecov-commenter commented Oct 3, 2024

Codecov Report

Attention: Patch coverage is 60.91954% with 34 lines in your changes missing coverage. Please review.

Project coverage is 63.81%. Comparing base (59551e4) to head (96d5e35).
Report is 1134 commits behind head on master.

Files with missing lines Patch % Lines
...pinot/segment/local/utils/SegmentPreloadUtils.java 66.66% 22 Missing and 4 partials ⚠️
...cal/upsert/BasePartitionUpsertMetadataManager.java 11.11% 7 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #14161      +/-   ##
============================================
+ Coverage     61.75%   63.81%   +2.06%     
- Complexity      207     1532    +1325     
============================================
  Files          2436     2621     +185     
  Lines        133233   144117   +10884     
  Branches      20636    22053    +1417     
============================================
+ Hits          82274    91970    +9696     
- Misses        44911    45350     +439     
- Partials       6048     6797     +749     
Flag Coverage Δ
custom-integration1 100.00% <ø> (+99.99%) ⬆️
integration 100.00% <ø> (+99.99%) ⬆️
integration1 100.00% <ø> (+99.99%) ⬆️
integration2 0.00% <ø> (ø)
java-11 63.78% <60.91%> (+2.07%) ⬆️
java-21 63.70% <60.91%> (+2.07%) ⬆️
skip-bytebuffers-false 63.80% <60.91%> (+2.05%) ⬆️
skip-bytebuffers-true 63.68% <60.91%> (+35.95%) ⬆️
temurin 63.81% <60.91%> (+2.06%) ⬆️
unittests 63.81% <60.91%> (+2.06%) ⬆️
unittests1 55.49% <0.00%> (+8.60%) ⬆️
unittests2 34.36% <60.91%> (+6.63%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@klsince klsince merged commit c4e03e3 into apache:master Oct 4, 2024
21 checks passed
@klsince klsince deleted the extract_utils_for_preload branch October 4, 2024 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants