You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "J-HowHuang (via GitHub)" <gi...@apache.org> on 2026/05/01 22:35:15 UTC
[PR] Remove deprecated field segmentAssignmentStrategy in SegmentsValidationAndRetentionConfig [pinot]
J-HowHuang opened a new pull request, #18398:
URL: https://github.com/apache/pinot/pull/18398
## Description
This field has been marked deprecated since https://github.com/apache/pinot/pull/11869, and has not been used in pinot code effectively.
## Backward Incompatibility
For any downstream usage of this deprecated field `segmentAssignmentStrategy` in `segmentConfig`, please read from `segmentAssignmentConfigMap` from first level field from table config instead. Related issue: https://github.com/apache/pinot/issues/13659
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Remove deprecated field segmentAssignmentStrategy in SegmentsValidationAndRetentionConfig [pinot]
Posted by "xiangfu0 (via GitHub)" <gi...@apache.org>.
xiangfu0 commented on code in PR #18398:
URL: https://github.com/apache/pinot/pull/18398#discussion_r3184234558
##########
pinot-tools/src/main/resources/examples/stream/airlineStats/docker/airlineStats_realtime_table_config.json:
##########
@@ -7,7 +7,6 @@
"retentionTimeUnit": "DAYS",
"retentionTimeValue": "5",
"segmentPushType": "APPEND",
- "segmentAssignmentStrategy": "BalanceNumSegmentAssignmentStrategy",
Review Comment:
For deprecated configs, we should move those to the new configs .
E.g. https://github.com/xiangfu0/pinot/blob/2fae407497b2ad3b24fb7ef01e8820e130099904/pinot-tools/src/main/resources/examples/batch/baseballStats/baseballStats_offline_table_config.json
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Remove deprecated field segmentAssignmentStrategy in SegmentsValidationAndRetentionConfig [pinot]
Posted by "J-HowHuang (via GitHub)" <gi...@apache.org>.
J-HowHuang commented on code in PR #18398:
URL: https://github.com/apache/pinot/pull/18398#discussion_r3196443990
##########
pinot-common/src/main/java/org/apache/pinot/common/assignment/InstanceAssignmentConfigUtils.java:
##########
@@ -65,10 +66,17 @@ public static boolean allowInstanceAssignment(TableConfig tableConfig,
// Allow OFFLINE instance assignment if the offline table has it configured or (for backward-compatibility) is
// using replica-group segment assignment
case OFFLINE:
+ Map<String, SegmentAssignmentConfig> segmentAssignmentConfigMap = tableConfig.getSegmentAssignmentConfigMap();
+ boolean isSetReplicaGroupAssignmentStrategy = false;
+ if (segmentAssignmentConfigMap != null
+ && segmentAssignmentConfigMap.get(instancePartitionsType.toString()) != null) {
+ isSetReplicaGroupAssignmentStrategy =
+ AssignmentStrategy.REPLICA_GROUP_SEGMENT_ASSIGNMENT_STRATEGY.equalsIgnoreCase(
+ segmentAssignmentConfigMap.get(instancePartitionsType.toString()).getAssignmentStrategy());
+ }
Review Comment:
It was this part of the original code
```
|| AssignmentStrategy.REPLICA_GROUP_SEGMENT_ASSIGNMENT_STRATEGY
.equalsIgnoreCase(tableConfig.getValidationConfig().getSegmentAssignmentStrategy()));
```
And we're deprecating this so I changed this to its counterpart, which is the `segmentAssignmentConfigMap`.
Also correctness-wise, in `SegmentAssignmentStrategyFactory#getSegmentAssignmentStrategy`, if a table doesn't have `instanceAssignmentConfig` but has the strategy explicitly set in `segmentAssignmentConfigMap`, it would use replica group strategy, so this check is relevant in this sense.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Remove deprecated field segmentAssignmentStrategy in SegmentsValidationAndRetentionConfig [pinot]
Posted by "xiangfu0 (via GitHub)" <gi...@apache.org>.
xiangfu0 commented on PR #18398:
URL: https://github.com/apache/pinot/pull/18398#issuecomment-4381022603
Opened docs follow-up: https://github.com/pinot-contrib/pinot-docs/pull/798
This updates the dimension-table docs to use top-level `segmentAssignmentConfigMap.OFFLINE.segmentAssignmentStrategy` instead of the removed `validationConfig.segmentAssignmentStrategy` field.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Remove deprecated field segmentAssignmentStrategy in SegmentsValidationAndRetentionConfig [pinot]
Posted by "yashmayya (via GitHub)" <gi...@apache.org>.
yashmayya merged PR #18398:
URL: https://github.com/apache/pinot/pull/18398
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Remove deprecated field segmentAssignmentStrategy in SegmentsValidationAndRetentionConfig [pinot]
Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on code in PR #18398:
URL: https://github.com/apache/pinot/pull/18398#discussion_r3193624055
##########
pinot-common/src/main/java/org/apache/pinot/common/assignment/InstanceAssignmentConfigUtils.java:
##########
@@ -65,10 +66,17 @@ public static boolean allowInstanceAssignment(TableConfig tableConfig,
// Allow OFFLINE instance assignment if the offline table has it configured or (for backward-compatibility) is
// using replica-group segment assignment
case OFFLINE:
+ Map<String, SegmentAssignmentConfig> segmentAssignmentConfigMap = tableConfig.getSegmentAssignmentConfigMap();
+ boolean isSetReplicaGroupAssignmentStrategy = false;
+ if (segmentAssignmentConfigMap != null
+ && segmentAssignmentConfigMap.get(instancePartitionsType.toString()) != null) {
+ isSetReplicaGroupAssignmentStrategy =
+ AssignmentStrategy.REPLICA_GROUP_SEGMENT_ASSIGNMENT_STRATEGY.equalsIgnoreCase(
+ segmentAssignmentConfigMap.get(instancePartitionsType.toString()).getAssignmentStrategy());
+ }
Review Comment:
Line 78 already covers this. When deprecating a field, in most cases we don't need to add new logic
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Remove deprecated field segmentAssignmentStrategy in SegmentsValidationAndRetentionConfig [pinot]
Posted by "J-HowHuang (via GitHub)" <gi...@apache.org>.
J-HowHuang commented on code in PR #18398:
URL: https://github.com/apache/pinot/pull/18398#discussion_r3193135533
##########
pinot-common/src/main/java/org/apache/pinot/common/assignment/InstanceAssignmentConfigUtils.java:
##########
@@ -65,10 +66,17 @@ public static boolean allowInstanceAssignment(TableConfig tableConfig,
// Allow OFFLINE instance assignment if the offline table has it configured or (for backward-compatibility) is
// using replica-group segment assignment
case OFFLINE:
+ Map<String, SegmentAssignmentConfig> segmentAssignmentConfigMap = tableConfig.getSegmentAssignmentConfigMap();
+ boolean isSetReplicaGroupAssignmentStrategy = false;
+ if (segmentAssignmentConfigMap != null
+ && segmentAssignmentConfigMap.get(instancePartitionsType.toString()) != null) {
+ isSetReplicaGroupAssignmentStrategy =
+ AssignmentStrategy.REPLICA_GROUP_SEGMENT_ASSIGNMENT_STRATEGY.equalsIgnoreCase(
+ segmentAssignmentConfigMap.get(instancePartitionsType.toString()).getAssignmentStrategy());
+ }
Review Comment:
This is to see if the table has explicitly configured `REPLICA_GROUP_SEGMENT_ASSIGNMENT_STRATEGY` in segment assignment strategy.
I don't know whether it's common to have this strategy explicitly set in segment assignment strategy, but this is the same logic as before, just to check from the segment assignment strategy map instead of segment assignment strategy in segment validation config (the deprecated field).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Remove deprecated field segmentAssignmentStrategy in SegmentsValidationAndRetentionConfig [pinot]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #18398:
URL: https://github.com/apache/pinot/pull/18398#issuecomment-4362122054
## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/18398?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `21.73913%` with `18 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 55.42%. Comparing base ([`5b0b38c`](https://app.codecov.io/gh/apache/pinot/commit/5b0b38cf82dda3d0766f47aeb4dbb3c28fe23c6d?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`41142d2`](https://app.codecov.io/gh/apache/pinot/commit/41142d2aea3474868f347b6ea09499dcfce84132?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 26 commits behind head on master.
| [Files with missing lines](https://app.codecov.io/gh/apache/pinot/pull/18398?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...he/pinot/segment/local/utils/TableConfigUtils.java](https://app.codecov.io/gh/apache/pinot/pull/18398?src=pr&el=tree&filepath=pinot-segment-local%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpinot%2Fsegment%2Flocal%2Futils%2FTableConfigUtils.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3Qtc2VnbWVudC1sb2NhbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3Qvc2VnbWVudC9sb2NhbC91dGlscy9UYWJsZUNvbmZpZ1V0aWxzLmphdmE=) | 18.75% | [12 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/pinot/pull/18398?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...mmon/assignment/InstanceAssignmentConfigUtils.java](https://app.codecov.io/gh/apache/pinot/pull/18398?src=pr&el=tree&filepath=pinot-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpinot%2Fcommon%2Fassignment%2FInstanceAssignmentConfigUtils.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vYXNzaWdubWVudC9JbnN0YW5jZUFzc2lnbm1lbnRDb25maWdVdGlscy5qYXZh) | 28.57% | [4 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/pinot/pull/18398?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
> :exclamation: There is a different number of reports uploaded between BASE (5b0b38c) and HEAD (41142d2). Click for more details.
>
> <details><summary>HEAD has 16 uploads less than BASE</summary>
>
>| Flag | BASE (5b0b38c) | HEAD (41142d2) |
>|------|------|------|
>|java-21|5|1|
>|unittests|2|1|
>|temurin|5|1|
>|unittests2|1|0|
>|integration|3|0|
>|integration1|1|0|
>|integration2|1|0|
>|custom-integration1|1|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #18398 +/- ##
============================================
- Coverage 63.43% 55.42% -8.02%
+ Complexity 1683 852 -831
============================================
Files 3253 2544 -709
Lines 198841 147619 -51222
Branches 30795 23779 -7016
============================================
- Hits 126136 81814 -44322
+ Misses 62625 58787 -3838
+ Partials 10080 7018 -3062
```
| [Flag](https://app.codecov.io/gh/apache/pinot/pull/18398/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [custom-integration1](https://app.codecov.io/gh/apache/pinot/pull/18398/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration](https://app.codecov.io/gh/apache/pinot/pull/18398/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration1](https://app.codecov.io/gh/apache/pinot/pull/18398/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [integration2](https://app.codecov.io/gh/apache/pinot/pull/18398/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [java-21](https://app.codecov.io/gh/apache/pinot/pull/18398/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.42% <21.73%> (-8.02%)` | :arrow_down: |
| [temurin](https://app.codecov.io/gh/apache/pinot/pull/18398/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.42% <21.73%> (-8.02%)` | :arrow_down: |
| [unittests](https://app.codecov.io/gh/apache/pinot/pull/18398/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.42% <21.73%> (-8.02%)` | :arrow_down: |
| [unittests1](https://app.codecov.io/gh/apache/pinot/pull/18398/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.42% <21.73%> (+0.05%)` | :arrow_up: |
| [unittests2](https://app.codecov.io/gh/apache/pinot/pull/18398/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/pinot/pull/18398?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Remove deprecated field segmentAssignmentStrategy in SegmentsValidationAndRetentionConfig [pinot]
Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on code in PR #18398:
URL: https://github.com/apache/pinot/pull/18398#discussion_r3193632258
##########
pinot-common/src/main/java/org/apache/pinot/common/assignment/InstanceAssignmentConfigUtils.java:
##########
@@ -65,10 +66,17 @@ public static boolean allowInstanceAssignment(TableConfig tableConfig,
// Allow OFFLINE instance assignment if the offline table has it configured or (for backward-compatibility) is
// using replica-group segment assignment
case OFFLINE:
+ Map<String, SegmentAssignmentConfig> segmentAssignmentConfigMap = tableConfig.getSegmentAssignmentConfigMap();
+ boolean isSetReplicaGroupAssignmentStrategy = false;
+ if (segmentAssignmentConfigMap != null
+ && segmentAssignmentConfigMap.get(instancePartitionsType.toString()) != null) {
+ isSetReplicaGroupAssignmentStrategy =
+ AssignmentStrategy.REPLICA_GROUP_SEGMENT_ASSIGNMENT_STRATEGY.equalsIgnoreCase(
+ segmentAssignmentConfigMap.get(instancePartitionsType.toString()).getAssignmentStrategy());
+ }
Review Comment:
We always allow instance assignment when `instanceAssignmentConfig` is configured. It is not tight to replica group assignment strategy
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Remove deprecated field segmentAssignmentStrategy in SegmentsValidationAndRetentionConfig [pinot]
Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on code in PR #18398:
URL: https://github.com/apache/pinot/pull/18398#discussion_r3203557352
##########
pinot-common/src/main/java/org/apache/pinot/common/assignment/InstanceAssignmentConfigUtils.java:
##########
@@ -65,10 +66,17 @@ public static boolean allowInstanceAssignment(TableConfig tableConfig,
// Allow OFFLINE instance assignment if the offline table has it configured or (for backward-compatibility) is
// using replica-group segment assignment
case OFFLINE:
+ Map<String, SegmentAssignmentConfig> segmentAssignmentConfigMap = tableConfig.getSegmentAssignmentConfigMap();
+ boolean isSetReplicaGroupAssignmentStrategy = false;
+ if (segmentAssignmentConfigMap != null
+ && segmentAssignmentConfigMap.get(instancePartitionsType.toString()) != null) {
+ isSetReplicaGroupAssignmentStrategy =
+ AssignmentStrategy.REPLICA_GROUP_SEGMENT_ASSIGNMENT_STRATEGY.equalsIgnoreCase(
+ segmentAssignmentConfigMap.get(instancePartitionsType.toString()).getAssignmentStrategy());
+ }
Review Comment:
I just realized this is segment assignment config, not instance assignment config.. But this is wrong coupling. Segment assignment config shouldn't interfere with instance assignment. The old `AssignmentStrategy.REPLICA_GROUP_SEGMENT_ASSIGNMENT_STRATEGY` has implicit meaning on both instance assignment and segment assignment, but segment assignment shouldn't be coupled with instance assignment.
Segment assignment config is very rarely used (I even forgot its existence). We should also modify all tests to explicitly put instance assignment config instead of segment assignment config.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Remove deprecated field segmentAssignmentStrategy in SegmentsValidationAndRetentionConfig [pinot]
Posted by "xiangfu0 (via GitHub)" <gi...@apache.org>.
xiangfu0 commented on code in PR #18398:
URL: https://github.com/apache/pinot/pull/18398#discussion_r3184238337
##########
pinot-tools/src/main/resources/examples/stream/airlineStats/docker/airlineStats_realtime_table_config.json:
##########
@@ -7,7 +7,6 @@
"retentionTimeUnit": "DAYS",
"retentionTimeValue": "5",
"segmentPushType": "APPEND",
- "segmentAssignmentStrategy": "BalanceNumSegmentAssignmentStrategy",
Review Comment:
I had a similar PR: https://github.com/apache/pinot/pull/18411, would love to let you do this and I can rebase:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Remove deprecated field segmentAssignmentStrategy in SegmentsValidationAndRetentionConfig [pinot]
Posted by "J-HowHuang (via GitHub)" <gi...@apache.org>.
J-HowHuang commented on code in PR #18398:
URL: https://github.com/apache/pinot/pull/18398#discussion_r3184568299
##########
pinot-tools/src/main/resources/examples/stream/airlineStats/docker/airlineStats_realtime_table_config.json:
##########
@@ -7,7 +7,6 @@
"retentionTimeUnit": "DAYS",
"retentionTimeValue": "5",
"segmentPushType": "APPEND",
- "segmentAssignmentStrategy": "BalanceNumSegmentAssignmentStrategy",
Review Comment:
This field is not consumed by anyone currently, so it should have effectively the same behavior after removing it. The `SegmentAssignmentStrategyFactory#getSegmentAssignmentStrategy` has been the one who figures out the strategy to use.
The new config:
```
"segmentAssignmentConfigMap": {
"OFFLINE": {
"segmentAssignmentStrategy": "BalanceNumSegmentAssignmentStrategy"
}
}
```
serves more like an override, IMO we don't need to provide them in the example table config.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [PR] Remove deprecated field segmentAssignmentStrategy in SegmentsValidationAndRetentionConfig [pinot]
Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on code in PR #18398:
URL: https://github.com/apache/pinot/pull/18398#discussion_r3193092954
##########
pinot-common/src/main/java/org/apache/pinot/common/assignment/InstanceAssignmentConfigUtils.java:
##########
@@ -65,10 +66,17 @@ public static boolean allowInstanceAssignment(TableConfig tableConfig,
// Allow OFFLINE instance assignment if the offline table has it configured or (for backward-compatibility) is
// using replica-group segment assignment
case OFFLINE:
+ Map<String, SegmentAssignmentConfig> segmentAssignmentConfigMap = tableConfig.getSegmentAssignmentConfigMap();
+ boolean isSetReplicaGroupAssignmentStrategy = false;
+ if (segmentAssignmentConfigMap != null
+ && segmentAssignmentConfigMap.get(instancePartitionsType.toString()) != null) {
+ isSetReplicaGroupAssignmentStrategy =
+ AssignmentStrategy.REPLICA_GROUP_SEGMENT_ASSIGNMENT_STRATEGY.equalsIgnoreCase(
+ segmentAssignmentConfigMap.get(instancePartitionsType.toString()).getAssignmentStrategy());
+ }
Review Comment:
Why do we need this logic?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org