KAFKA-15045: (KIP-924 pt. 15) Implement #defaultStandbyTaskAssignment and finish rack-aware standby optimization#16129
Conversation
This fills in the implementation details of the standby task assignment utility functions within TaskAssignmentUtils.
| final String rack1 = clientRacks.get(clientState1.processId().id()).get(); | ||
| final String rack2 = clientRacks.get(clientState2.processId().id()).get(); |
There was a problem hiding this comment.
Future cleanup: we can actually get rid of this clientRacks data structure altogether, and just use the rack ids we already processed and nicely organized in the KafkaStreamsState which is addressable by UUID, ie
| final String rack1 = clientRacks.get(clientState1.processId().id()).get(); | |
| final String rack2 = clientRacks.get(clientState2.processId().id()).get(); | |
| final String rack1 = kafkaStreamsStates.get(clientState1.processId().id()).rackId().get(); | |
| final String rack2 = kafkaStreamsStates.get(clientState2.processId().id()).rackId().get(); |
ableegoldman
left a comment
There was a problem hiding this comment.
A few more things that need to be addressed but can be done in a followup PR
| Function.identity(), | ||
| taskId -> { | ||
| final Set<String> stateStoreNames = topologyMetadata | ||
| .stateStoreNameToSourceTopicsForTopology(taskId.topologyName()) |
There was a problem hiding this comment.
Ah somehow I missed this before -- this is actually returning all the state stores for this topology, it's not specific to the taskId. This was an existing issue so we don't need to fix it in this PR, it can be addressed in a followup. It might be a bit complicated so I'll take a look at how we can get this info
Would've caught this during testing since we definitely want tests with mixed stateless-and-stateful tasks, but still good to fix ASAP
|
Test failures are unrelated. Merging to trunk |
… and finish rack-aware standby optimization (apache#16129) This fills in the implementation details of the standby task assignment utility functions within TaskAssignmentUtils. Reviewers: Anna Sophie Blee-Goldman <ableegoldman@apache.org>
… and finish rack-aware standby optimization (apache#16129) This fills in the implementation details of the standby task assignment utility functions within TaskAssignmentUtils. Reviewers: Anna Sophie Blee-Goldman <ableegoldman@apache.org>
… and finish rack-aware standby optimization (apache#16129) This fills in the implementation details of the standby task assignment utility functions within TaskAssignmentUtils. Reviewers: Anna Sophie Blee-Goldman <ableegoldman@apache.org>
… and finish rack-aware standby optimization (apache#16129) This fills in the implementation details of the standby task assignment utility functions within TaskAssignmentUtils. Reviewers: Anna Sophie Blee-Goldman <ableegoldman@apache.org>
This fills in the implementation details of the standby task assignment utility functions within TaskAssignmentUtils.