jackylee-ch opened a new pull request, #10358:
URL: https://github.com/apache/paimon/pull/10358

   ### Purpose
   
   `dynamic-bucket.target-row-num` is the target row count per bucket in 
dynamic bucket mode (default `2000000`). 
`CoreOptions#dynamicBucketTargetRowNum()` returned it unchecked, so a 
non-positive value makes every dynamic-bucket assigner's `rows >= 
targetBucketRowNumber` test true for the very first row — a new bucket is 
rolled per record (bucket explosion, a flood of tiny files, badly degraded 
reads and writes), with no error. The parallel 
`postpone.target-row-num-per-bucket` already guards `> 0`.
   
   This validates it in the getter, so every consumer 
(`SimpleHashBucketAssigner`, `HashBucketAssigner`, `PartitionIndex`, 
`GlobalIndexAssigner`) rejects a non-positive value with a clear message, 
matching the existing numeric-option checks (e.g. the sort-spill threshold).
   
   ### Tests
   
   `CoreOptionsTest#testDynamicBucketTargetRowNumRejectsNonPositive`: asserts 
`dynamicBucketTargetRowNum()` throws `IllegalArgumentException` for `0` and 
`-1`.
   
   ### API and Format
   
   No change.
   
   ### Documentation
   
   No change.
   


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