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

Add ability for minion nodes to download segments from servers during task execution #12960

Merged

Conversation

tibrewalpratik17
Copy link
Contributor

@tibrewalpratik17 tibrewalpratik17 commented Apr 18, 2024

label:

  • feature
  • release-notes

Resolves #12458. See the linked issue for more details.

This patch allows minion nodes to download segments from servers rather than only relying on deepstore copy. This is behind a task-level config: allowDownloadFromServer (default value is false).

Tested in our cluster by removing deepstore copies explicitly and enabling this config. We were able to successfully compact a segment post this config.

@tibrewalpratik17 tibrewalpratik17 marked this pull request as draft April 18, 2024 06:40
@codecov-commenter
Copy link

codecov-commenter commented Apr 18, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 36 lines in your changes are missing coverage. Please review.

Project coverage is 62.23%. Comparing base (59551e4) to head (d67f21c).
Report is 458 commits behind head on master.

Files Patch % Lines
...he/pinot/plugin/minion/tasks/BaseTaskExecutor.java 5.26% 18 Missing ⚠️
.../tasks/BaseMultipleSegmentsConversionExecutor.java 0.00% 9 Missing ⚠️
...ion/tasks/BaseSingleSegmentConversionExecutor.java 0.00% 3 Missing ⚠️
...che/pinot/plugin/minion/tasks/MinionTaskUtils.java 71.42% 0 Missing and 2 partials ⚠️
...psertcompaction/UpsertCompactionTaskGenerator.java 0.00% 2 Missing ⚠️
.../plugin/minion/tasks/purge/PurgeTaskGenerator.java 0.00% 1 Missing ⚠️
...he/pinot/segment/local/utils/TableConfigUtils.java 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #12960      +/-   ##
============================================
+ Coverage     61.75%   62.23%   +0.48%     
+ Complexity      207      198       -9     
============================================
  Files          2436     2520      +84     
  Lines        133233   138320    +5087     
  Branches      20636    21396     +760     
============================================
+ Hits          82274    86081    +3807     
- Misses        44911    45820     +909     
- Partials       6048     6419     +371     
Flag Coverage Δ
custom-integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration <0.01% <0.00%> (-0.01%) ⬇️
integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration2 0.00% <0.00%> (ø)
java-11 62.20% <33.33%> (+0.49%) ⬆️
java-21 62.12% <33.33%> (+0.49%) ⬆️
skip-bytebuffers-false 62.21% <33.33%> (+0.47%) ⬆️
skip-bytebuffers-true 62.10% <33.33%> (+34.37%) ⬆️
temurin 62.23% <33.33%> (+0.48%) ⬆️
unittests 62.22% <33.33%> (+0.48%) ⬆️
unittests1 46.72% <0.00%> (-0.17%) ⬇️
unittests2 27.94% <33.33%> (+0.21%) ⬆️

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.

@Jackie-Jiang Jackie-Jiang added feature release-notes Referenced by PRs that need attention when compiling the next release notes minion labels Apr 18, 2024
@tibrewalpratik17 tibrewalpratik17 marked this pull request as ready for review May 6, 2024 13:13
@tibrewalpratik17 tibrewalpratik17 changed the title [WIP] Add ability for minion nodes to download segments from servers during task execution Add ability for minion nodes to download segments from servers during task execution May 6, 2024
@tibrewalpratik17
Copy link
Contributor Author

cc @ankitsultana @Jackie-Jiang @snleee can you please help review?

@@ -89,6 +89,8 @@ public class PinotTaskManager extends ControllerPeriodicTask<Void> {
public final static String LEAD_CONTROLLER_MANAGER_KEY = "LeadControllerManager";
public final static String SCHEDULE_KEY = "schedule";
public final static String MINION_INSTANCE_TAG_CONFIG = "minionInstanceTag";
public final static String MINION_ALLOW_DOWNLOAD_FROM_SERVER = "allowDownloadFromServer";
public final static boolean DEFAULT_MINION_ALLOW_DOWNLOAD_FROM_SERVER = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

should we just turn this on by default? though I understand that it could have a negative impact on the server when the server has to tar the segment and ship it to the minion, it is likely better than stopping Minion tasks altogether which is the current behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Keeping it true may affect other custom tasks folks might have written which might be okay to fail but impact servers a lot if server starts to tar. Maybe we can make it default true as a cluster level config and keep option of overriding to false at task level. Wdyt? I'd still suggest to do in a follow-up so that we can get this feature in as a separate patch and in a follow-up we can introduce a minion-cluster level config (gives option of easy to revert that particular patch).

@tibrewalpratik17
Copy link
Contributor Author

Thanks @ankitsultana for the review! Addressed your comments.

@ankitsultana ankitsultana merged commit b5c00da into apache:master May 17, 2024
20 checks passed
LOGGER.info("Trying to download from servers for segment {} post deepstore download failed", segmentName);
SegmentFetcherFactory.getSegmentFetcher(
getTableConfig(tableNameWithType).getValidationConfig().getPeerSegmentDownloadScheme())
.fetchSegmentToLocal(segmentName, () -> {
Copy link
Contributor

Choose a reason for hiding this comment

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

@tibrewalpratik17 : I merged the PR, but want to call out that we are not decrypting the segment here. You can use fetchAndDecryptSegmentToLocal instead in a follow-up PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Raised #13178 for this! Thanks!

@npawar
Copy link
Contributor

npawar commented May 22, 2024

Have the docs been updated @tibrewalpratik17 ?

@tibrewalpratik17
Copy link
Contributor Author

Thanks @npawar for the reminder! I will update the docs with all the PRs you tagged me on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature minion release-notes Referenced by PRs that need attention when compiling the next release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow peerDownload config for minion-tasks
5 participants