kafka
kafka copied to clipboard
KAFKA-10199: Expose read only task from state updater
The state updater exposes tasks that are in restoration to the stream thread. To ensure that the stream thread only accesses the tasks to read from the tasks without modifying any internal state, this PR introduces a read-only task that throws an exception if the caller tries to modify the internal state of a task.
This PR also returns read-only tasks from DefaultStateUpdater#getTasks().
Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
The failures in DefaultStateUpdaterTest seems relevant?
Failures are unrelated:
Build / JDK 8 and Scala 2.12 / org.apache.kafka.clients.consumer.CooperativeStickyAssignorTest.testLargeAssignmentAndGroupWithNonEqualSubscription()
Build / JDK 8 and Scala 2.12 / org.apache.kafka.clients.consumer.StickyAssignorTest.testLargeAssignmentAndGroupWithNonEqualSubscription()
Build / JDK 8 and Scala 2.12 / org.apache.kafka.connect.integration.BlockingConnectorTest.testBlockInConnectorStart