lh0156 opened a new pull request, #23067:
URL: https://github.com/apache/kafka/pull/23067

   ### Summary
   
   When a Streams group mixes members with and without `application.server`, 
the assignor currently omits partitions assigned to endpoint-less members from 
`partitionsByHost`. Streams IQ derives source-topic partition counts from this 
map, so the omission can make key partitioning use a smaller modulo and return 
incorrect hosts or results.
   
   Preserve those partitions under the existing `HostInfo.unavailable()` 
sentinel when at least one group member has an application server endpoint. 
This keeps the partition count complete while clearly marking those partitions 
as not queryable through an application server. When no member has an endpoint, 
retain the existing empty host metadata behavior.
   
   No public API, wire format, or configuration changes.
   
   ### Test Strategy
   
   Added parameterized tests across all assignor configurations for mixed and 
all-unconfigured groups. The mixed case verifies the unavailable sentinel and 
complete partition union; the all-unconfigured case verifies existing behavior.
   
   Verified with:
   
   - `./gradlew :streams:test --tests 
org.apache.kafka.streams.processor.internals.StreamsPartitionAssignorTest`
   - `./gradlew :streams:spotlessCheck :streams:checkstyleMain 
:streams:checkstyleTest :streams:spotbugsMain`
   


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