Skip to content

Conversation

@klsince
Copy link
Contributor

@klsince klsince commented Apr 19, 2023

SegmentRelocator should check and update segment target tier when tierConfigs is provided, so that segment gets its right target tier set in its ZK metadata to make features like index config tier overwrites (#10553) work properly. Previously, target tier was only updated for the multi-volume feature.

@codecov-commenter
Copy link

codecov-commenter commented Apr 19, 2023

Codecov Report

Merging #10642 (9f40e4f) into master (f2afe21) will increase coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff            @@
##             master   #10642   +/-   ##
=========================================
  Coverage     70.31%   70.32%           
  Complexity     6495     6495           
=========================================
  Files          2106     2106           
  Lines        113381   113374    -7     
  Branches      17090    17089    -1     
=========================================
- Hits          79728    79725    -3     
+ Misses        28059    28052    -7     
- Partials       5594     5597    +3     
Flag Coverage Δ
integration1 24.39% <0.00%> (+<0.01%) ⬆️
integration2 23.94% <0.00%> (-0.02%) ⬇️
unittests1 67.86% <ø> (-0.02%) ⬇️
unittests2 13.87% <0.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...roller/helix/core/relocation/SegmentRelocator.java 67.83% <0.00%> (+0.98%) ⬆️

... and 26 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

relocate = true;
LOGGER.info("Relocating COMPLETED segments for table: {}", tableNameWithType);
}
if (_enableLocalTierMigration) {
Copy link
Contributor

Choose a reason for hiding this comment

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

multi volume feature was being controlled by this flag?

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 flag controls the controller side logic - checking segment current vs. target tier and issue segment reload msg.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

on the server side, this TierBasedSegmentDirectoryLoader should be used, instead of the default loader. The former one sets the correct tier on the segment for the controller side logic to check.

@npawar npawar merged commit a48591b into apache:master Apr 19, 2023
@klsince klsince deleted the separate_tier_updater branch April 19, 2023 23:45
npawar pushed a commit that referenced this pull request May 2, 2023
This PR tries to make index config tier overwriting #10553 more robust.

Turns out the fix in #10642 is not enough, e.g. if one updates tierConfigs in table config and calls rebalance API to move segments around and it happens before SegmentRelocator task kicks in to update the segment target tiers, it's still possible that segments are loaded on the new servers without using the tier specific index configs. So moving the logic that updates segment target tier into rebalanceTable method to be shared by both table rebalance API and SegmentRelocator periodic task.
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.

3 participants