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

   Fixes https://github.com/apache/pinot/issues/18485
   
   ## Summary
   
   Add controller capability to reject segment uploads when the segment is 
already outside the table’s configured **data retention** window (time-based 
retention), using `RetentionUtils` so the boundary matches retention manager 
behavior.
   
   - New controller property: 
`controller.segment.upload.rejectOutOfRetention.enabled` (default `false`). No 
behavior change until it is set to `true`.
   - Wired on **single-segment upload** only 
(`PinotSegmentUploadDownloadRestletResource` → 
`SegmentValidationUtils.rejectUploadIfOutOfRetention`). **METADATA** batch 
upload and **reingest** upload paths are unchanged.
   - Retention check is **skipped** for **OFFLINE** tables whose batch segment 
ingestion type is **not** `APPEND` (completed-segment semantics). **REALTIME** 
and **OFFLINE** with **APPEND** ingestion are evaluated when the flag is on and 
retention parses successfully.
   - Shared parsing / purgeability helpers live in `RetentionUtils` 
(`parseTableDataRetentionMillis`, `SegmentMetadata`-based `isPurgeable`, 
`segmentMetadataEndTimeMillis`). Configuration is surfaced via `ControllerConf`.
   
   ## Release notes
   
   - New controller configuration: 
`controller.segment.upload.rejectOutOfRetention.enabled` (default `false`). 
When `true`, single-segment upload may return **403** if the segment is outside 
the table data retention window as defined by 
`SegmentsValidationAndRetentionConfig` retention time value/unit.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to