ableegoldman commented on a change in pull request #9487:
URL: https://github.com/apache/kafka/pull/9487#discussion_r518488577



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamsPartitionAssignor.java
##########
@@ -255,8 +255,9 @@ public ByteBuffer subscriptionUserData(final Set<String> 
topics) {
             taskManager.processId(),
             userEndPoint,
             taskManager.getTaskOffsetSums(),
-            uniqueField)
-                .encode();
+            uniqueField,
+            (byte) assignmentErrorCode.get()

Review comment:
       This cast makes me kind of uncomfortable...either the 
`assignmentErrorCode` that we have in the AssignmentInfo is conceptually the 
same as the one we're adding to the SubscriptionInfo (in which case it should 
be the same type), or it's not the same, in which case we should use a 
different variable to track it.
   
   Personally I think it's probably simpler to keep them the same, and just add 
an `int` errorCode field to the Subscription instead of a `byte` 
shutdownRequested field. But it's your choice




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to