Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Kafka, mail # user - Stale TopicMetadata


Copy link to this message
-
Re: Stale TopicMetadata
Colin Blower 2013-07-11, 17:54
Hm... the cache may explain some odd behavior I was seeing in our
cluster yesterday.

The zookeeper information for which nodes were In Sync Replicas was
different that the data I received from a metadata request response.
Zookeeper said two nodes were ISR and the metadata response said only
the leader was ISR. This was after one of our two nodes went down, but
when both were back up.

I don't have the time to properly try to reproduce it, but it may be
something to think about if you are looking at caching issues.
On 07/10/2013 10:16 PM, Jun Rao wrote:
> That's actually not expected. We should only return live brokers to the
> client. It seems that we never clear the live broker cache in the brokers.
> This is a bug. Could you file a jira?
>
> Thanks,
>
> Jun
>
>
> On Wed, Jul 10, 2013 at 8:52 AM, Vinicius Carvalho <
> [EMAIL PROTECTED]> wrote:
>
>> Hi there. Once again, I don't think I could get the docs on another topic.
>>
>> So my nodejs client connects to the broker and the first thing it does is
>> store the topic metadata:
>>
>> data received
>> {
>>     "brokers": [
>>         {
>>             "nodeId": 0,
>>             "host": "10.139.245.106",
>>             "port": 9092,
>>             "byteLength": 24
>>         },
>>         {
>>             "nodeId": 1,
>>             "host": "localhost",
>>             "port": 9093,
>>             "byteLength": 19
>>         }
>>     ],
>>     "topicMetadata": [
>>         {
>>             "topicErrorCode": 0,
>>             "topicName": "foozbar",
>>             "partitions": [
>>                 {
>>                     "replicas": [
>>                         0
>>                     ],
>>                     "isr": [
>>                         0
>>                     ],
>>                     "partitionErrorCode": 0,
>>                     "partitionId": 0,
>>                     "leader": 0,
>>                     "byteLength": 26
>>                 },
>>                 {
>>                     "replicas": [
>>                         1
>>                     ],
>>                     "isr": [
>>                         1
>>                     ],
>>                     "partitionErrorCode": 0,
>>                     "partitionId": 1,
>>                     "leader": 1,
>>                     "byteLength": 26
>>                 },
>>                 {
>>                     "replicas": [
>>                         0
>>                     ],
>>                     "isr": [
>>                         0
>>                     ],
>>                     "partitionErrorCode": 0,
>>                     "partitionId": 2,
>>                     "leader": 0,
>>                     "byteLength": 26
>>                 },
>>                 {
>>                     "replicas": [
>>                         1
>>                     ],
>>                     "isr": [
>>                         1
>>                     ],
>>                     "partitionErrorCode": 0,
>>                     "partitionId": 3,
>>                     "leader": 1,
>>                     "byteLength": 26
>>                 },
>>                 {
>>                     "replicas": [
>>                         0
>>                     ],
>>                     "isr": [
>>                         0
>>                     ],
>>                     "partitionErrorCode": 0,
>>                     "partitionId": 4,
>>                     "leader": 0,
>>                     "byteLength": 26
>>                 }
>>             ],
>>             "byteLength": 145
>>         }
>>     ],
>>     "responseSize": 200,
>>     "correlationId": -1000
>> }
>>
>> Ok, so far so good. So I kill node 0 on purpose. Trying to simulate a
>> broker failure, and then I fetch metadata again:
>>
>> data received
>> {
>>     "brokers": [
>>         {
>>             "nodeId": 0,
>>             "host": "10.139.245.106",
>>             "port": 9092,
>>             "byteLength": 24
>>         },
>>         {
>>             "nodeId": 1,
*Colin Blower*
/Software Engineer/
Barracuda Networks Inc.
+1 408-342-5576 (o)