vigneshio opened a new pull request, #4970:
URL: https://github.com/apache/polaris/pull/4970

   Fix infinite loop from non-positive TABLE_METADATA_CLEANUP_BATCH_SIZE
   
   `TABLE_METADATA_CLEANUP_BATCH_SIZE` is realm-overridable without bounds. 
When a realm/catalog override sets the value to `0` or negative, 
`TableCleanupTaskHandler.getMetadataFileBatches(...)` behaves badly: `0` causes 
an infinite loop in the batch-splitting logic, and negative values cause 
`IllegalArgumentException` from `List.subList(...)`.
   
   This change clamps the configured batch size to at least 1 at the use site 
with `Math.max(1, batchSize)`, preventing the availability issue without 
changing the existing configuration machinery. A regression test with a short 
`@Timeout` verifies that a `0` override still results in queued cleanup 
subtasks instead of hanging.
   
   ## Checklist
   - [ ]  Don't disclose security issues! (contact [email protected])
   - [x] Clearly explained why the changes are needed, or linked related issues
   - [x] Added/updated tests with good coverage, or manually tested (and 
explained how)
   - [x] Added comments for complex logic
   - [x] Updated \`CHANGELOG.md\` (if needed)
   - [ ] Updated documentation in \`site/content/in-dev/unreleased\` (if needed)


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

Reply via email to