abhishekrb19 opened a new pull request, #16145: URL: https://github.com/apache/druid/pull/16145
### Description: Before this patch, `isValid()` treated empty segment IDs inconsistently. Consider the following scenarios with each parameter to `markUsed` and `markUnused` APIs and their outcomes: 1. Interval = null & segment IDs = null: Invalid 2. Interval = non-null & segment IDs = []: Invalid 3. Interval = non-null & segment IDs = null: Valid 4. Interval = null & segment IDs = []: Invalid Note that in scenario 2, empty segment IDs are treated as the existence of the parameter. On the other hand, in scenario 4, empty segment IDs are treated as the absence of the parameter, which is confusing from an API user's perspective. ### Fix: With this patch, empty segment IDs are treated the same as null, indicating the absence of the parameter. So the outcome of scenario 2 will be Valid. Added unit tests for the missing scenarios and updated the expectations of a couple of existing unit tests. This PR has: - [x] been self-reviewed. - [x] a release note entry in the PR description. - [x] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met. - [x] been tested in a test Druid cluster. -- 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]
