Donot allow force-download reload for upsert/dedup tables with when TTL is set#18860
Draft
deepthi912 wants to merge 1 commit into
Draft
Donot allow force-download reload for upsert/dedup tables with when TTL is set#18860deepthi912 wants to merge 1 commit into
deepthi912 wants to merge 1 commit into
Conversation
… 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.
Codecov Report❌ Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: