You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "xiangfu0 (via GitHub)" <gi...@apache.org> on 2026/07/14 21:27:17 UTC

[PR] Fix realtime segment compressed size metadata [pinot]

xiangfu0 opened a new pull request, #18992:
URL: https://github.com/apache/pinot/pull/18992

   ## Summary
   
   - Add an optional `segmentCompressedSizeBytes` completion-protocol parameter so realtime servers can report the generated tar.gz size separately from the unpacked build size.
   - Persist the compressed archive size as `segment.size.in.bytes`, while retaining the unpacked size for flush auto-tuning and as a rolling-upgrade fallback.
   - Use the archive size in deep-store recovery, refresh stale DONE metadata after a successful recovery upload, and label the controller UI value as **Compressed Segment Size**.
   - Document the size-field semantics, rollout behavior, and sample API queries in `pinot-tools/src/main/resources/examples/compression-stats/README.md`.
   
   ## Motivation
   
   Realtime segment completion previously used `segment.getSegmentSizeBytes()`, which measures the generated unpacked segment directory, for `segment.size.in.bytes`. Other segment ingestion paths define that metadata field as the downloadable compressed archive size. This made realtime metadata substantially larger than the persisted tar.gz and caused confusing comparisons with server disk-size APIs.
   
   ## Compatibility
   
   The new protocol parameter is optional. During rolling upgrades:
   
   - A new controller receiving a commit from an old server falls back to the existing unpacked `segmentSizeBytes` value.
   - An old controller ignores the extra parameter from a new server and preserves the prior behavior.
   - Flush auto-tuning continues to consume the unpacked build size, so row-limit behavior is unchanged.
   - Existing metadata is not proactively rewritten. An upgraded deep-store recovery can refresh the value when it rebuilds the archive.
   
   ## User guide and sample queries
   
   The updated compression-statistics example guide explains the difference between `segment.size.in.bytes`, verbose table-size `diskSizeInBytes`, and compression-statistics value sizes. It also includes runnable `curl` and `jq` queries for comparing one realtime segment across the metadata and table-size APIs.
   
   ## Testing
   
   - `SegmentCompletionProtocolTest`
   - `RealtimeSegmentDataManagerTest` (27 tests)
   - `PinotLLCRealtimeSegmentManagerTest` and `SizeBasedSegmentFlushThresholdComputerTest` (1,070 tests)
   - `TablesResourceTest` (21 tests)
   - Controller UI Vite production bundle build
   - `spotless:apply`, `license:format`, `checkstyle:check`, and `license:check` for `pinot-common`, `pinot-core`, `pinot-server`, and `pinot-controller`


-- 
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] Fix realtime segment size metadata [pinot]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #18992:
URL: https://github.com/apache/pinot/pull/18992#issuecomment-4975084496

   ## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/18992?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 `68.00000%` with `8 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 57.04%. Comparing base ([`068b458`](https://app.codecov.io/gh/apache/pinot/commit/068b458883d645ee2c686ab2a5e123ef2ffe8cff?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`3490f3c`](https://app.codecov.io/gh/apache/pinot/commit/3490f3cc576f8163b0a8db98f56b5ac5463702f4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/pinot/pull/18992?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/18992?src=pr&el=tree&filepath=pinot-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpinot%2Fcore%2Fdata%2Fmanager%2Frealtime%2FRealtimeSegmentDataManager.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9kYXRhL21hbmFnZXIvcmVhbHRpbWUvUmVhbHRpbWVTZWdtZW50RGF0YU1hbmFnZXIuamF2YQ==) | 60.00% | [4 Missing :warning: ](https://app.codecov.io/gh/apache/pinot/pull/18992?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...ata/manager/realtime/RealtimeTableDataManager.java](https://app.codecov.io/gh/apache/pinot/pull/18992?src=pr&el=tree&filepath=pinot-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpinot%2Fcore%2Fdata%2Fmanager%2Frealtime%2FRealtimeTableDataManager.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9kYXRhL21hbmFnZXIvcmVhbHRpbWUvUmVhbHRpbWVUYWJsZURhdGFNYW5hZ2VyLmphdmE=) | 0.00% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/pinot/pull/18992?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...indexsegment/immutable/ImmutableSegmentLoader.java](https://app.codecov.io/gh/apache/pinot/pull/18992?src=pr&el=tree&filepath=pinot-segment-local%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpinot%2Fsegment%2Flocal%2Findexsegment%2Fimmutable%2FImmutableSegmentLoader.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3Qtc2VnbWVudC1sb2NhbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3Qvc2VnbWVudC9sb2NhbC9pbmRleHNlZ21lbnQvaW1tdXRhYmxlL0ltbXV0YWJsZVNlZ21lbnRMb2FkZXIuamF2YQ==) | 84.61% | [1 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/pinot/pull/18992?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 (068b458) and HEAD (3490f3c). Click for more details.
   > 
   > <details><summary>HEAD has 16 uploads less than BASE</summary>
   >
   >| Flag | BASE (068b458) | HEAD (3490f3c) |
   >|------|------|------|
   >|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   #18992      +/-   ##
   ============================================
   - Coverage     65.22%   57.04%   -8.18%     
   + Complexity     1405        1    -1404     
   ============================================
     Files          3418     2622     -796     
     Lines        214651   155030   -59621     
     Branches      33922    25273    -8649     
   ============================================
   - Hits         140006    88443   -51563     
   + Misses        63356    58997    -4359     
   + Partials      11289     7590    -3699     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/pinot/pull/18992/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/18992/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/18992/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/18992/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/18992/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/18992/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `57.04% <68.00%> (-8.18%)` | :arrow_down: |
   | [temurin](https://app.codecov.io/gh/apache/pinot/pull/18992/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `57.04% <68.00%> (-8.18%)` | :arrow_down: |
   | [unittests](https://app.codecov.io/gh/apache/pinot/pull/18992/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `57.04% <68.00%> (-8.18%)` | :arrow_down: |
   | [unittests1](https://app.codecov.io/gh/apache/pinot/pull/18992/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `57.04% <68.00%> (+0.18%)` | :arrow_up: |
   | [unittests2](https://app.codecov.io/gh/apache/pinot/pull/18992/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 Harness](https://app.codecov.io/gh/apache/pinot/pull/18992?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] Fix realtime segment size metadata [pinot]

Posted by "xiangfu0 (via GitHub)" <gi...@apache.org>.
xiangfu0 closed pull request #18992: Fix realtime segment size metadata
URL: https://github.com/apache/pinot/pull/18992


-- 
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