From 13995b9f5218b21dc9e28dbfea95e8a816f7bc38 Mon Sep 17 00:00:00 2001 From: Luke Chen Date: Fri, 4 Sep 2020 11:54:35 +0800 Subject: [PATCH 1/2] Document IQ APIs where order does not hold between stores --- .../org/apache/kafka/streams/state/ReadOnlyWindowStore.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/streams/src/main/java/org/apache/kafka/streams/state/ReadOnlyWindowStore.java b/streams/src/main/java/org/apache/kafka/streams/state/ReadOnlyWindowStore.java index 71a31f7dd303f..c1f349a200c23 100644 --- a/streams/src/main/java/org/apache/kafka/streams/state/ReadOnlyWindowStore.java +++ b/streams/src/main/java/org/apache/kafka/streams/state/ReadOnlyWindowStore.java @@ -25,6 +25,11 @@ * A window store that only supports read operations. * Implementations should be thread-safe as concurrent reads and writes are expected. * + * Note: The current implementation of either forward or backward fetches on range-key-range-time does not + * obey the ordering when there are multiple local stores hosted on that instance. For example, + * if there are two stores from two tasks hosting keys {1,3} and {2,4}, then a range query of key [1,4] + * would return in the order of [1,3,2,4] but not [1,2,3,4] since it is just looping over the stores only. + * * @param Type of keys * @param Type of values */ From c7f7c8f86c3b72dc04e1804b01b31cfd25dbb2d0 Mon Sep 17 00:00:00 2001 From: "Matthias J. Sax" Date: Mon, 21 Sep 2020 18:40:23 -0700 Subject: [PATCH 2/2] Update streams/src/main/java/org/apache/kafka/streams/state/ReadOnlyWindowStore.java --- .../org/apache/kafka/streams/state/ReadOnlyWindowStore.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/streams/src/main/java/org/apache/kafka/streams/state/ReadOnlyWindowStore.java b/streams/src/main/java/org/apache/kafka/streams/state/ReadOnlyWindowStore.java index c1f349a200c23..586ab93809b03 100644 --- a/streams/src/main/java/org/apache/kafka/streams/state/ReadOnlyWindowStore.java +++ b/streams/src/main/java/org/apache/kafka/streams/state/ReadOnlyWindowStore.java @@ -25,7 +25,7 @@ * A window store that only supports read operations. * Implementations should be thread-safe as concurrent reads and writes are expected. * - * Note: The current implementation of either forward or backward fetches on range-key-range-time does not + *

Note: The current implementation of either forward or backward fetches on range-key-range-time does not * obey the ordering when there are multiple local stores hosted on that instance. For example, * if there are two stores from two tasks hosting keys {1,3} and {2,4}, then a range query of key [1,4] * would return in the order of [1,3,2,4] but not [1,2,3,4] since it is just looping over the stores only.