You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "Jackie-Jiang (via GitHub)" <gi...@apache.org> on 2024/03/21 07:35:05 UTC
[PR] Enhance commit threshold to accept size threshold without setting rows to 0 [pinot]
Jackie-Jiang opened a new pull request, #12684:
URL: https://github.com/apache/pinot/pull/12684
Currently in order to use segment size based commit threshold, rows must be explicitly set to 0. This is very confusing because usually people only set the threshold they want to honor.
With the PR:
- When `rows == 0`: use segment size based (backward compatible)
- When `rows > 0`: use rows
- When `rows < 0` (or not set):
- When `segment size > 0`: use segment size
- When `segment size <= 0` (or not set): use default rows
Also fail the invalid config instead of silently using default value.
--
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] Enhance commit threshold to accept size threshold without setting rows to 0 [pinot]
Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on code in PR #12684:
URL: https://github.com/apache/pinot/pull/12684#discussion_r1535077183
##########
pinot-controller/src/test/java/org/apache/pinot/controller/helix/core/realtime/segment/FlushThresholdUpdaterTest.java:
##########
@@ -53,49 +53,57 @@ public class FlushThresholdUpdaterTest {
public void testFlushThresholdUpdateManager() {
FlushThresholdUpdateManager flushThresholdUpdateManager = new FlushThresholdUpdateManager();
- // Flush threshold rows larger than 0 - DefaultFlushThresholdUpdater should be returned
- FlushThresholdUpdater defaultFlushThresholdUpdater = flushThresholdUpdateManager
- .getFlushThresholdUpdater(mockStreamConfig(StreamConfig.DEFAULT_FLUSH_THRESHOLD_ROWS));
- assertTrue(defaultFlushThresholdUpdater instanceof DefaultFlushThresholdUpdater);
- assertEquals(((DefaultFlushThresholdUpdater) defaultFlushThresholdUpdater).getTableFlushSize(),
+ // Neither flush threshold rows nor segment size is set - DefaultFlushThresholdUpdater should be returned
+ FlushThresholdUpdater flushThresholdUpdater =
+ flushThresholdUpdateManager.getFlushThresholdUpdater(mockStreamConfig(-1, -1));
+ assertTrue(flushThresholdUpdater instanceof DefaultFlushThresholdUpdater);
+ assertEquals(((DefaultFlushThresholdUpdater) flushThresholdUpdater).getTableFlushSize(),
StreamConfig.DEFAULT_FLUSH_THRESHOLD_ROWS);
+ // Flush threshold rows larger than 0 - DefaultFlushThresholdUpdater should be returned
Review Comment:
For existing table configs, we follow this order; we don't allow such config in new added/updated table config as we validate only one can be configured
--
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] Enhance commit threshold to accept size threshold without setting rows to 0 [pinot]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #12684:
URL: https://github.com/apache/pinot/pull/12684#issuecomment-2013325543
## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/12684?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
Attention: Patch coverage is `85.71429%` with `4 lines` in your changes are missing coverage. Please review.
> Project coverage is 61.39%. Comparing base [(`59551e4`)](https://app.codecov.io/gh/apache/pinot/commit/59551e45224f1535c4863fd577622b37366ccc97?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`b607d59`)](https://app.codecov.io/gh/apache/pinot/pull/12684?dropdown=coverage&src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
> Report is 152 commits behind head on master.
| [Files](https://app.codecov.io/gh/apache/pinot/pull/12684?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...a/manager/realtime/RealtimeSegmentDataManager.java](https://app.codecov.io/gh/apache/pinot/pull/12684?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9kYXRhL21hbmFnZXIvcmVhbHRpbWUvUmVhbHRpbWVTZWdtZW50RGF0YU1hbmFnZXIuamF2YQ==) | 40.00% | [1 Missing and 2 partials :warning: ](https://app.codecov.io/gh/apache/pinot/pull/12684?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...he/pinot/segment/local/utils/TableConfigUtils.java](https://app.codecov.io/gh/apache/pinot/pull/12684?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3Qtc2VnbWVudC1sb2NhbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3Qvc2VnbWVudC9sb2NhbC91dGlscy9UYWJsZUNvbmZpZ1V0aWxzLmphdmE=) | 83.33% | [0 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/pinot/pull/12684?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #12684 +/- ##
============================================
- Coverage 61.75% 61.39% -0.36%
+ Complexity 207 198 -9
============================================
Files 2436 2456 +20
Lines 133233 134342 +1109
Branches 20636 20787 +151
============================================
+ Hits 82274 82484 +210
- Misses 44911 45680 +769
- Partials 6048 6178 +130
```
| [Flag](https://app.codecov.io/gh/apache/pinot/pull/12684/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/12684/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `<0.01% <0.00%> (-0.01%)` | :arrow_down: |
| [integration](https://app.codecov.io/gh/apache/pinot/pull/12684/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `<0.01% <0.00%> (-0.01%)` | :arrow_down: |
| [integration1](https://app.codecov.io/gh/apache/pinot/pull/12684/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `<0.01% <0.00%> (-0.01%)` | :arrow_down: |
| [integration2](https://app.codecov.io/gh/apache/pinot/pull/12684/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `0.00% <0.00%> (ø)` | |
| [java-11](https://app.codecov.io/gh/apache/pinot/pull/12684/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `<0.01% <0.00%> (-61.71%)` | :arrow_down: |
| [java-21](https://app.codecov.io/gh/apache/pinot/pull/12684/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `61.39% <85.71%> (-0.23%)` | :arrow_down: |
| [skip-bytebuffers-false](https://app.codecov.io/gh/apache/pinot/pull/12684/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `61.38% <85.71%> (-0.37%)` | :arrow_down: |
| [skip-bytebuffers-true](https://app.codecov.io/gh/apache/pinot/pull/12684/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `27.92% <53.57%> (+0.19%)` | :arrow_up: |
| [temurin](https://app.codecov.io/gh/apache/pinot/pull/12684/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `61.39% <85.71%> (-0.36%)` | :arrow_down: |
| [unittests](https://app.codecov.io/gh/apache/pinot/pull/12684/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `61.39% <85.71%> (-0.36%)` | :arrow_down: |
| [unittests1](https://app.codecov.io/gh/apache/pinot/pull/12684/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `45.97% <50.00%> (-0.92%)` | :arrow_down: |
| [unittests2](https://app.codecov.io/gh/apache/pinot/pull/12684/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `27.92% <53.57%> (+0.19%)` | :arrow_up: |
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/12684?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).
--
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] Enhance commit threshold to accept size threshold without setting rows to 0 [pinot]
Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang merged PR #12684:
URL: https://github.com/apache/pinot/pull/12684
--
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] Enhance commit threshold to accept size threshold without setting rows to 0 [pinot]
Posted by "snleee (via GitHub)" <gi...@apache.org>.
snleee commented on code in PR #12684:
URL: https://github.com/apache/pinot/pull/12684#discussion_r1534892766
##########
pinot-controller/src/test/java/org/apache/pinot/controller/helix/core/realtime/segment/FlushThresholdUpdaterTest.java:
##########
@@ -53,49 +53,57 @@ public class FlushThresholdUpdaterTest {
public void testFlushThresholdUpdateManager() {
FlushThresholdUpdateManager flushThresholdUpdateManager = new FlushThresholdUpdateManager();
- // Flush threshold rows larger than 0 - DefaultFlushThresholdUpdater should be returned
- FlushThresholdUpdater defaultFlushThresholdUpdater = flushThresholdUpdateManager
- .getFlushThresholdUpdater(mockStreamConfig(StreamConfig.DEFAULT_FLUSH_THRESHOLD_ROWS));
- assertTrue(defaultFlushThresholdUpdater instanceof DefaultFlushThresholdUpdater);
- assertEquals(((DefaultFlushThresholdUpdater) defaultFlushThresholdUpdater).getTableFlushSize(),
+ // Neither flush threshold rows nor segment size is set - DefaultFlushThresholdUpdater should be returned
+ FlushThresholdUpdater flushThresholdUpdater =
+ flushThresholdUpdateManager.getFlushThresholdUpdater(mockStreamConfig(-1, -1));
+ assertTrue(flushThresholdUpdater instanceof DefaultFlushThresholdUpdater);
+ assertEquals(((DefaultFlushThresholdUpdater) flushThresholdUpdater).getTableFlushSize(),
StreamConfig.DEFAULT_FLUSH_THRESHOLD_ROWS);
+ // Flush threshold rows larger than 0 - DefaultFlushThresholdUpdater should be returned
Review Comment:
Just to make sure (I see that this is already the case as we compute the row based config first):
When both row and segment size based configurations are configured, the original code picked the row based option?
This is important as changing this will make the code not backward compatible.
--
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