TheR1sing3un opened a new pull request, #13189: URL: https://github.com/apache/hudi/pull/13189
We execute a sql with: 1. `bulk insert` operation 2. `92160 ` buckets per partition 3. `set hoodie.bulkinsert.shuffle.parallelism=92160` And then there a error occurs: <img width="894" alt="image" src="https://github.com/user-attachments/assets/5fa5f11e-06fb-467e-8c60-527b486f95e9" /> The reason for this error is that when our partitioner calculates the partition id, it returns a number that is not within the parallelism range. As for why an illegal id was returned, is it because there is an overflow of int type during the process of calculating the id. <img width="937" alt="image" src="https://github.com/user-attachments/assets/8084a4f2-0ffe-401a-8ea3-c1cfe3c7fab9" /> ### Change Logs 1. avoid obtaining an incorrect partition id due to int type overflow in `BucketIndexUtil` _Describe context and summary for this change. Highlight if any code was copied._ ### Impact fix the error when we set a large buckets num and large `hoodie.bulkinsert.shuffle.parallelism` ### Risk level (write none, low medium or high below) low ### Documentation Update none - _The config description must be updated if new configs are added or the default value of the configs are changed_ - _Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the ticket number here and follow the [instruction](https://hudi.apache.org/contribute/developer-setup#website) to make changes to the website._ ### Contributor's checklist - [x] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [x] Change Logs and Impact were stated clearly - [x] Adequate tests were added if applicable - [x] CI passed -- 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]
