You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/03/18 16:08:40 UTC

[GitHub] [kafka] rhauch commented on a change in pull request #10315: KAFKA-12463: Update default sink task partition assignor to cooperative sticky assignor

rhauch commented on a change in pull request #10315:
URL: https://github.com/apache/kafka/pull/10315#discussion_r597007027



##########
File path: connect/runtime/src/main/java/org/apache/kafka/connect/runtime/Worker.java
##########
@@ -698,6 +700,8 @@ private WorkerTask buildWorkerTask(ClusterConfigState configState,
         consumerProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
         consumerProps.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, "org.apache.kafka.common.serialization.ByteArrayDeserializer");
         consumerProps.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, "org.apache.kafka.common.serialization.ByteArrayDeserializer");
+        consumerProps.put(ConsumerConfig.PARTITION_ASSIGNMENT_STRATEGY_CONFIG,
+            CooperativeStickyAssignor.class.getName() + "," + RangeAssignor.class.getName());

Review comment:
       As discussed on the [Jira issue](https://issues.apache.org/jira/browse/KAFKA-12463), I think you're suggesting that we use `RoundRobinAssignor` instead of `CooperativeStickyAssignor` due to the issue you found with Connect using the latter ([KAFKA-12487](https://issues.apache.org/jira/browse/KAFKA-12487)).
   
   Also, it's probably worthwhile to add a comment here about why we're using _two_ assignors rather than _only_ the cooperative (or round robin) assignor. Maybe something like:
   ```
   // Prefer the cooperative assignor, but allow old range assignor during rolling upgrades
   // from Connect versions that just used the range assignor (the default)
   ```




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org