Skip to content

Donot allow force-download reload for upsert/dedup tables with when TTL is set#18860

Draft
deepthi912 wants to merge 1 commit into
apache:masterfrom
deepthi912:block-force-download-ttl-upsert-dedup
Draft

Donot allow force-download reload for upsert/dedup tables with when TTL is set#18860
deepthi912 wants to merge 1 commit into
apache:masterfrom
deepthi912:block-force-download-ttl-upsert-dedup

Conversation

@deepthi912

@deepthi912 deepthi912 commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Force download rebuilds a segment from its original deep-store copy, discarding the server-side upsert/dedup metadata for that segment. When the table uses metadataTTL/deletedKeysTTL to expire primary keys, the original copy still contains keys that the TTL has already expired or deleted or invalidated, so force download can resurrect them and produce incorrect query results especially during cases where crc don't match.

This PR rejects reload requests with forceDownload=true on:

  • upsert tables with metadataTTL or deletedKeysTTL set
  • dedup tables with metadataTTL set

… cleanup

Force download rebuilds a segment from its original deep-store copy, discarding
the server-side upsert/dedup metadata for that segment. When the table uses
metadataTTL/deletedKeysTTL to expire primary keys, the original copy still
contains keys that the TTL has already expired or deleted, so force download can
resurrect them and produce incorrect query results.

Reject reload requests with forceDownload=true on:
- upsert tables with metadataTTL or deletedKeysTTL set
- dedup tables with metadataTTL set

The validation lives in PinotTableReloadService and covers all reload paths
(single segment, all segments, time-range, and instanceToSegmentsMap). If the
table config cannot be read for an already-resolved table, the request fails
closed rather than letting a potentially unsafe force download through.
@deepthi912 deepthi912 requested a review from Jackie-Jiang June 26, 2026 07:15
@codecov-commenter

codecov-commenter commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.45455% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 37.18%. Comparing base (a9b5207) to head (c46bf01).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...t/controller/services/PinotTableReloadService.java 95.45% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (a9b5207) and HEAD (c46bf01). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (a9b5207) HEAD (c46bf01)
unittests1 1 0
unittests 2 1
Additional details and impacted files
@@              Coverage Diff              @@
##             master   #18860       +/-   ##
=============================================
- Coverage     64.79%   37.18%   -27.62%     
+ Complexity     1322     1321        -1     
=============================================
  Files          3393     3393               
  Lines        211265   211287       +22     
  Branches      33212    33219        +7     
=============================================
- Hits         136896    78569    -58327     
- Misses        63320   125518    +62198     
+ Partials      11049     7200     -3849     
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (?)
java-21 37.18% <95.45%> (-27.62%) ⬇️
temurin 37.18% <95.45%> (-27.62%) ⬇️
unittests 37.18% <95.45%> (-27.62%) ⬇️
unittests1 ?
unittests2 37.18% <95.45%> (+0.02%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@deepthi912 deepthi912 added upsert Related to upsert functionality dedup Changes related to realtime ingestion dedup handling bug Something is not working as expected labels Jun 26, 2026
@deepthi912 deepthi912 marked this pull request as draft June 26, 2026 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something is not working as expected dedup Changes related to realtime ingestion dedup handling upsert Related to upsert functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants