KAFKA-10030 allow fetching a key from a single partition#8706
KAFKA-10030 allow fetching a key from a single partition#8706mjsax merged 12 commits intoapache:trunkfrom
Conversation
|
Retest this please. |
|
@vinothchandar @brary for review |
|
Retest this please. |
1 similar comment
|
Retest this please. |
mjsax
left a comment
There was a problem hiding this comment.
Thanks for adding tests. Some minor follow up comments
|
Retest this please. |
2 similar comments
|
Retest this please. |
|
Retest this please. |
|
Seems Jenkins is too busy... Will try again later |
|
Retest this please. |
1 similar comment
|
Retest this please. |
cc @dima5rr |
|
Retest this please. |
|
Retest this please. |
|
|
||
| @Test | ||
| public void shouldReturnKVStoreWithPartitionWhenItExists() { | ||
| assertNotNull(storeProvider.getStore(StoreQueryParameters.fromNameAndType(keyValueStore, QueryableStoreTypes.keyValueStore()).withPartition(numStateStorePartitions - 1))); |
There was a problem hiding this comment.
It might be better to test if the right store is returned instead of just checking for not-null? For this, in before() we need to get a reference on the store we pass into addStore()?
There was a problem hiding this comment.
I think how to validate returned store reference, QueryableStoreProvider always wraps it in CompositeReadOnlyKeyValueStore?
There was a problem hiding this comment.
Hmmm... Good point. Let leave it as-is. It's also covered in integration tests that the right store is returned.
|
Retest this please. |
|
Retest this please. |
2 similar comments
|
Retest this please. |
|
Retest this please. |
|
Jenkins does not cooperator right now. Will try again later. |
|
Test this please |
Reviewers: Navinder Pal Singh Brar <navinder_brar@yahoo.com>, Boyang Chen <boyang@confluent.io>, Matthias J. Sax <matthias@confluent.io>
Reviewers: Navinder Pal Singh Brar <navinder_brar@yahoo.com>, Boyang Chen <boyang@confluent.io>, Matthias J. Sax <matthias@confluent.io>
|
Thanks for the PR @dima5rr. Merged to |
* apache-github/2.6: (32 commits) KAFKA-10083: fix failed testReassignmentWithRandomSubscriptionsAndChanges tests (apache#8786) KAFKA-9945: TopicCommand should support --if-exists and --if-not-exists when --bootstrap-server is used (apache#8737) KAFKA-9320: Enable TLSv1.3 by default (KIP-573) (apache#8695) KAFKA-10082: Fix the failed testMultiConsumerStickyAssignment (apache#8777) MINOR: Remove unused variable to fix spotBugs failure (apache#8779) MINOR: ChangelogReader should poll for duration 0 for standby restore (apache#8773) KAFKA-10030: Allow fetching a key from a single partition (apache#8706) Kafka-10064 Add documentation for KIP-571 (apache#8760) MINOR: Code cleanup and assertion message fixes in Connect integration tests (apache#8750) KAFKA-9987: optimize sticky assignment algorithm for same-subscription case (apache#8668) KAFKA-9392; Clarify deleteAcls javadoc and add test for create/delete timing (apache#7956) KAFKA-10074: Improve performance of `matchingAcls` (apache#8769) KAFKA-9494; Include additional metadata information in DescribeConfig response (KIP-569) (apache#8723) KAFKA-10056; Ensure consumer metadata contains new topics on subscription change (apache#8739) KAFKA-10029; Don't update completedReceives when channels are closed to avoid ConcurrentModificationException (apache#8705) KAFKA-10061; Fix flaky `ReassignPartitionsIntegrationTest.testCancellation` (apache#8749) KAFKA-9130; KIP-518 Allow listing consumer groups per state (apache#8238) KAFKA-9501: convert between active and standby without closing stores (apache#8248) MINOR: Relax Percentiles test (apache#8748) MINOR: regression test for task assignor config (apache#8743) ...
StreamThreadStateStoreProvider#stores throws exception whenever taskId is not found, which is not correct behaviour in multi-threaded env where state store partitions are distributed among several StreamTasks.
final Task task = tasks.get(keyTaskId);
if (task == null) {
throw new InvalidStateStoreException(
String.format("The specified partition %d for store %s does not exist.",
storeQueryParams.partition(),
storeName));
}
Reproducible with KStream number of threads more then 1
StoreQueryIntegrationTest#streamsConfiguration
config.put(StreamsConfig.NUM_STREAM_THREADS_CONFIG, 2);
Suggested solution is to not throw exception if at least one state store is found, which is always true when using StoreQueryParameters.withPartition
https://issues.apache.org/jira/browse/KAFKA-10030?jql=project%20%3D%20KAFKA%20AND%20component%20%3D%20streams
@mjsax @guozhangwang