kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject [kafka] branch trunk updated: KAFKA-6999: Add description on read-write lock vulnerability of ReadOnlyKeyValueStore (#5351)
Date Sat, 28 Jul 2018 14:56:35 GMT
This is an automated email from the ASF dual-hosted git repository.

guozhang pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 495c78d  KAFKA-6999: Add description on read-write lock vulnerability of ReadOnlyKeyValueStore
(#5351)
495c78d is described below

commit 495c78db6f0d0d3fe111ea49f8041b5b3e32a8a4
Author: Lee Dongjin <dongjin@apache.org>
AuthorDate: Sat Jul 28 23:56:31 2018 +0900

    KAFKA-6999: Add description on read-write lock vulnerability of ReadOnlyKeyValueStore
(#5351)
    
    Reviewers: Guozhang Wang <wangguoz@gmail.com>
---
 .../java/org/apache/kafka/streams/state/ReadOnlyKeyValueStore.java  | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/streams/src/main/java/org/apache/kafka/streams/state/ReadOnlyKeyValueStore.java
b/streams/src/main/java/org/apache/kafka/streams/state/ReadOnlyKeyValueStore.java
index 0632980..8725ebc 100644
--- a/streams/src/main/java/org/apache/kafka/streams/state/ReadOnlyKeyValueStore.java
+++ b/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
  * 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 <V> the value type
  */


Mime
View raw message