[ 
https://issues.apache.org/jira/browse/KAFKA-7640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16719404#comment-16719404
 ] 

John Roesler commented on KAFKA-7640:
-------------------------------------

Hi [~hiteshbachanna],

You mentioned that you've confirmed from the logs that the requests are going 
to the wrong host. Can you share this evidence?

 

I think what we need to do is try to start narrowing down the scope of the 
problem. Perhaps a good starting point is to make sure that the logs contain 
both the REST events and the Streams state transitions and metadata (DEBUG 
should be sufficient for this; you'll have to make sure you log the REST 
requests as well).

I'd start by identifying one request that incorrectly returned no data. We'd 
want to know what the metadata response was for this request (so that needs to 
be logged as well).

Then, you'd locate the corresponding REST request and response on the server 
side. Also, you'd want to identify the host that actually does have the key, 
and try to narrow down where in the system the wrong host is being reported.

 

Is Streams confused about which host owns which partitions (shouldn't be 
possible)? Or are the instances reporting their hostname incorrectly? Or 
something else...

> Kafka stream interactive query not returning data when state is backed by 
> rocksdb
> ---------------------------------------------------------------------------------
>
>                 Key: KAFKA-7640
>                 URL: https://issues.apache.org/jira/browse/KAFKA-7640
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 2.0.0
>            Reporter: hitesh gollahalli bachanna
>            Priority: Major
>
> I have a kafka stream app running with 36 different instance (one for each 
> partition). Each instance come up one after the other. And I am building rest 
> service on top of the state to access the data.
> Here some code that I use:
> {code:java}
> StreamsMetadata metadata = streams.metadataForKey(store, key, serializer); 
> --> call this find ouy which host has the key
> if (localSelf.host().equals(hostStoreInfo.getHost())) {
> get the key from local store
> }
> else {
> call the remote host using restTemplate
> }{code}
> The problem now is `metadata` object returned has a different host/ip but the 
> data is on a different node. I was able to see using some application logs I 
> printed. This happens every time I start my application.
> The `allMetadata` method in `KafkaStreams` class says the value will be 
> update as when the partition get reassigned. But its not happening in this 
> case. 
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to