cadonna commented on code in PR #13025:
URL: https://github.com/apache/kafka/pull/13025#discussion_r1105612105


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/ReadOnlyTask.java:
##########
@@ -190,7 +190,7 @@ public void clearTaskTimeout() {
 
     @Override
     public boolean commitNeeded() {
-        throw new UnsupportedOperationException("This task is read-only");
+        return task.commitNeeded();

Review Comment:
   It gives me a bit of a headache to forward the call to `commitNeeded()` 
since it changes the state of a stream task by updating the consumed offsets.
   I am also wondering why Streams also commits restoring tasks.    



##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/ReadOnlyTask.java:
##########
@@ -200,7 +200,7 @@ public StateStore getStore(final String name) {
 
     @Override
     public Map<TopicPartition, Long> changelogOffsets() {
-        throw new UnsupportedOperationException("This task is read-only");
+        return task.changelogOffsets();

Review Comment:
   If I understand the code correctly, this forwarding is fine.



-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to