Browse Source

KAFKA-6999: Add description on read-write lock vulnerability of ReadOnlyKeyValueStore (#5351)

Reviewers: Guozhang Wang <wangguoz@gmail.com>
pull/5299/merge
Lee Dongjin 6 years ago committed by Guozhang Wang
parent
commit
495c78db6f
  1. 6
      streams/src/main/java/org/apache/kafka/streams/state/ReadOnlyKeyValueStore.java

6
streams/src/main/java/org/apache/kafka/streams/state/ReadOnlyKeyValueStore.java

@ -23,6 +23,12 @@ import org.apache.kafka.streams.errors.InvalidStateStoreException;
* Implementations should be thread-safe as concurrent reads and writes * Implementations should be thread-safe as concurrent reads and writes
* are expected. * are expected.
* *
* Please note that this contract defines the thread-safe read functionality only; it does not
* guarantee anything about whether the actual instance is writable by another thread, or
* whether it uses some locking mechanism under the hood. For this reason, making dependencies
* between the read and write operations on different StateStore instances can cause concurrency
* problems like deadlock.
*
* @param <K> the key type * @param <K> the key type
* @param <V> the value type * @param <V> the value type
*/ */

Loading…
Cancel
Save