KAFKA-6970: All standard state stores guarded with read only wrapper#6016
KAFKA-6970: All standard state stores guarded with read only wrapper#6016mjsax merged 7 commits intoapache:trunkfrom
Conversation
… with read only wrapper
|
Tests fail with Seems this PR breaks something. |
|
Also note: only |
|
Hey @nizhikov , Thanks for picking this up! After reading the ticket, I think the current change doesn't quite do what we want... James (the reporter) mentioned this method being used for getting a state store for use in Transformer and Processor, both of which need read-write access to the store. It sounds like the idea is to protect users from calling methods that are intended only to be called from the framework. This is similar to the KAFKA-7420, as you mentioned in the ticket, but local state stores may safely be read/write, where as global state stores must be read-only. Plus, James specifically called out protecting init() and close(), neither of which are protected by the current decorators. I'd propose:
How does that sound? (edit) I didn't refresh, so I didn't see @mjsax 's prior comments... sorry about the overlap. |
* Use existing `AbstractStateStore implements WrappedStateStore`. * Fixing `TupleForwarder` to work with several `WrappedStateStore` that wraps each other.
|
I reworked PR as follows:
Kafka, already have an abstract class for a
Right now
If we don't extend |
mjsax
left a comment
There was a problem hiding this comment.
Thanks for the PR. Couple of comments/nits.
vvcephei
left a comment
There was a problem hiding this comment.
Looks good! I had one nitpick...
Thanks for this,
-John
| } | ||
|
|
||
| @Override | ||
| public KeyValueIterator<Windowed<K>, AGG> fetch(final K from, final K to) { |
|
The java 11 test failure is unrelated: https://builds.apache.org/job/kafka-pr-jdk11-scala2.12/1162/ |
|
Retest this, please. |
|
@mjsax I fixed all your comments. Tests are green. Please, review. |
|
Merged to Thanks for the PR @nizhikov! |
|
No problem, @nizhikov ; thanks for the contribution! |
…pache#6016) Reviewer: Matthias J. Sax <matthias@confluent.io>, John Roesler <john@confluent.io>
Committer Checklist (excluded from commit message)