-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add ability for minion nodes to download segments from servers during task execution #12960
Conversation
84934ff
to
59d3ab2
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
59d3ab2
to
3495dd8
Compare
3495dd8
to
534020e
Compare
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; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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).
...src/main/java/org/apache/pinot/controller/helix/core/minion/generator/BaseTaskGenerator.java
Outdated
Show resolved
Hide resolved
...est/java/org/apache/pinot/controller/helix/core/minion/generator/TaskGeneratorUtilsTest.java
Show resolved
Hide resolved
...c/main/java/org/apache/pinot/plugin/minion/tasks/BaseMultipleSegmentsConversionExecutor.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/apache/pinot/plugin/minion/tasks/BaseSingleSegmentConversionExecutor.java
Outdated
Show resolved
Hide resolved
534020e
to
309001b
Compare
Thanks @ankitsultana for the review! Addressed your comments. |
...src/main/java/org/apache/pinot/controller/helix/core/minion/generator/BaseTaskGenerator.java
Outdated
Show resolved
Hide resolved
...inion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/BaseTaskExecutor.java
Outdated
Show resolved
Hide resolved
536e437
to
4b2ea98
Compare
...inion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/BaseTaskExecutor.java
Outdated
Show resolved
Hide resolved
...on-builtin-tasks/src/test/java/org/apache/pinot/plugin/minion/tasks/MinionTaskUtilsTest.java
Show resolved
Hide resolved
LOGGER.info("Trying to download from servers for segment {} post deepstore download failed", segmentName); | ||
SegmentFetcherFactory.getSegmentFetcher( | ||
getTableConfig(tableNameWithType).getValidationConfig().getPeerSegmentDownloadScheme()) | ||
.fetchSegmentToLocal(segmentName, () -> { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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!
Have the docs been updated @tibrewalpratik17 ? |
Thanks @npawar for the reminder! I will update the docs with all the PRs you tagged me on. |
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.