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

Additional check to avoid downloading segments from deep store #14957

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

deepthi912
Copy link
Collaborator

@deepthi912 deepthi912 commented Jan 30, 2025

Continuation to : #10089

This avoids downloading from deep store when we can just simply use the existing directory.

@deepthi912 deepthi912 requested a review from klsince January 30, 2025 21:36
SegmentDirectory segmentDirectory =
initSegmentDirectory(segmentName, String.valueOf(zkMetadata.getCrc()), indexLoadingConfig);
// We should first try to reuse existing segment directory
if (isDirectoryReusable(zkMetadata, segmentTier, segmentDirectory, indexLoadingConfig, schema)) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Wondering if I should add a forceDownload property here!

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't fully follow. When CRC mismatch, we should always download a new copy from the deep store right?

Copy link
Contributor

Choose a reason for hiding this comment

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

@deepthi912 I think we can try to override downloadAndLoadSegment() to do the extra checks before downloading raw segments from deep store or move those inside interface, as those extra steps (particularly initializing SegmentDirectory object) don't apply to servers managing segments on local disk.

@codecov-commenter
Copy link

codecov-commenter commented Jan 30, 2025

Codecov Report

Attention: Patch coverage is 33.38633% with 838 lines in your changes missing coverage. Please review.

Project coverage is 34.00%. Comparing base (59551e4) to head (0396059).
Report is 1652 commits behind head on master.

Files with missing lines Patch % Lines
...gation/function/TimeSeriesAggregationFunction.java 0.00% 99 Missing ⚠️
.../core/realtime/PinotLLCRealtimeSegmentManager.java 64.77% 52 Missing and 10 partials ⚠️
...org/apache/pinot/core/data/table/IndexedTable.java 0.00% 50 Missing ⚠️
...ata/manager/realtime/RealtimeTableDataManager.java 0.00% 45 Missing ⚠️
...x/core/realtime/PauselessSegmentCompletionFSM.java 0.00% 42 Missing ⚠️
...e/operator/timeseries/TimeSeriesOperatorUtils.java 0.00% 36 Missing ⚠️
...rm/function/TimeSeriesBucketTransformFunction.java 0.00% 32 Missing ⚠️
...inot/controller/helix/ControllerRequestClient.java 0.00% 22 Missing ⚠️
...ontroller/api/resources/PinotControllerLogger.java 0.00% 20 Missing ⚠️
...requesthandler/MultiStageBrokerRequestHandler.java 0.00% 19 Missing ⚠️
... and 72 more

❗ There is a different number of reports uploaded between BASE (59551e4) and HEAD (0396059). Click for more details.

HEAD has 23 uploads less than BASE
Flag BASE (59551e4) HEAD (0396059)
integration 7 6
integration2 3 0
temurin 12 8
java-21 7 5
skip-bytebuffers-true 3 2
skip-bytebuffers-false 7 3
unittests 5 2
unittests1 2 0
java-11 5 3
unittests2 3 2
Additional details and impacted files
@@              Coverage Diff              @@
##             master   #14957       +/-   ##
=============================================
- Coverage     61.75%   34.00%   -27.76%     
- Complexity      207      673      +466     
=============================================
  Files          2436     2712      +276     
  Lines        133233   152009    +18776     
  Branches      20636    23486     +2850     
=============================================
- Hits          82274    51684    -30590     
- Misses        44911    96147    +51236     
+ Partials       6048     4178     -1870     
Flag Coverage Δ
custom-integration1 100.00% <ø> (+99.99%) ⬆️
integration 100.00% <ø> (+99.99%) ⬆️
integration1 100.00% <ø> (+99.99%) ⬆️
integration2 ?
java-11 34.00% <33.38%> (-27.71%) ⬇️
java-21 33.99% <33.38%> (-27.64%) ⬇️
skip-bytebuffers-false 34.00% <33.38%> (-27.75%) ⬇️
skip-bytebuffers-true 33.99% <33.38%> (+6.26%) ⬆️
temurin 34.00% <33.38%> (-27.76%) ⬇️
unittests 33.99% <33.38%> (-27.76%) ⬇️
unittests1 ?
unittests2 33.99% <33.38%> (+6.26%) ⬆️

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.

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.

4 participants