You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by Ashish Singh <as...@cloudera.com> on 2015/06/24 07:09:38 UTC

Review Request 35820: Patch for KAFKA-1367

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35820/
-----------------------------------------------------------

Review request for kafka.


Bugs: KAFKA-1367
    https://issues.apache.org/jira/browse/KAFKA-1367


Repository: kafka


Description
-------

KAFKA-1367: Broker topic metadata not kept in sync with ZooKeeper


Diffs
-----

  core/src/main/scala/kafka/common/TopicAndPartition.scala df3db912f5daef6a25b4b2dd2220d2cc3795bce6 
  core/src/main/scala/kafka/controller/KafkaController.scala 36350579b16027359d237b64699003358704ac6f 
  core/src/main/scala/kafka/utils/ReplicationUtils.scala 60687332b4c9bee4d4c0851314cfb4b02d5d3489 
  core/src/main/scala/kafka/utils/ZkUtils.scala 78475e3d5ec477cef00caeaa34ff2d196466be96 
  core/src/test/scala/unit/kafka/utils/ReplicationUtilsTest.scala c96c0ffd958d63c09880d436b2e5ae96f51ead36 

Diff: https://reviews.apache.org/r/35820/diff/


Testing
-------

Tested


Thanks,

Ashish Singh


Re: Review Request 35820: Patch for KAFKA-1367

Posted by Ashish Singh <as...@cloudera.com>.

> On July 7, 2015, 5:53 p.m., Guozhang Wang wrote:
> > core/src/main/scala/kafka/controller/KafkaController.scala, lines 898-903
> > <https://reviews.apache.org/r/35820/diff/3/?file=1000895#file1000895line898>
> >
> >     I think we need to add the de-registration functions as other listeners upon controller re-designation?

Oops, missed de-registration part. Will provide a patch shortly. Thanks for catching this Guozhang!


- Ashish


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35820/#review90734
-----------------------------------------------------------


On July 7, 2015, 5:04 a.m., Ashish Singh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35820/
> -----------------------------------------------------------
> 
> (Updated July 7, 2015, 5:04 a.m.)
> 
> 
> Review request for kafka.
> 
> 
> Bugs: KAFKA-1367
>     https://issues.apache.org/jira/browse/KAFKA-1367
> 
> 
> Repository: kafka
> 
> 
> Description
> -------
> 
> KAFKA-1367: Broker topic metadata not kept in sync with ZooKeeper
> 
> 
> Diffs
> -----
> 
>   core/src/main/scala/kafka/common/TopicAndPartition.scala df3db912f5daef6a25b4b2dd2220d2cc3795bce6 
>   core/src/main/scala/kafka/controller/KafkaController.scala 36350579b16027359d237b64699003358704ac6f 
>   core/src/main/scala/kafka/utils/ReplicationUtils.scala 60687332b4c9bee4d4c0851314cfb4b02d5d3489 
>   core/src/main/scala/kafka/utils/ZkUtils.scala 78475e3d5ec477cef00caeaa34ff2d196466be96 
>   core/src/test/scala/unit/kafka/integration/TopicMetadataTest.scala 995b05901491bb0dbf0df210d44bd1d7f66fdc82 
>   core/src/test/scala/unit/kafka/utils/ReplicationUtilsTest.scala c96c0ffd958d63c09880d436b2e5ae96f51ead36 
> 
> Diff: https://reviews.apache.org/r/35820/diff/
> 
> 
> Testing
> -------
> 
> Tested on a test cluster with 3 Kafka brokers
> 
> 
> Thanks,
> 
> Ashish Singh
> 
>


Re: Review Request 35820: Patch for KAFKA-1367

Posted by Guozhang Wang <wa...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35820/#review90734
-----------------------------------------------------------



core/src/main/scala/kafka/controller/KafkaController.scala (lines 898 - 903)
<https://reviews.apache.org/r/35820/#comment143869>

    I think we need to add the de-registration functions as other listeners upon controller re-designation?


- Guozhang Wang


On July 7, 2015, 5:04 a.m., Ashish Singh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35820/
> -----------------------------------------------------------
> 
> (Updated July 7, 2015, 5:04 a.m.)
> 
> 
> Review request for kafka.
> 
> 
> Bugs: KAFKA-1367
>     https://issues.apache.org/jira/browse/KAFKA-1367
> 
> 
> Repository: kafka
> 
> 
> Description
> -------
> 
> KAFKA-1367: Broker topic metadata not kept in sync with ZooKeeper
> 
> 
> Diffs
> -----
> 
>   core/src/main/scala/kafka/common/TopicAndPartition.scala df3db912f5daef6a25b4b2dd2220d2cc3795bce6 
>   core/src/main/scala/kafka/controller/KafkaController.scala 36350579b16027359d237b64699003358704ac6f 
>   core/src/main/scala/kafka/utils/ReplicationUtils.scala 60687332b4c9bee4d4c0851314cfb4b02d5d3489 
>   core/src/main/scala/kafka/utils/ZkUtils.scala 78475e3d5ec477cef00caeaa34ff2d196466be96 
>   core/src/test/scala/unit/kafka/integration/TopicMetadataTest.scala 995b05901491bb0dbf0df210d44bd1d7f66fdc82 
>   core/src/test/scala/unit/kafka/utils/ReplicationUtilsTest.scala c96c0ffd958d63c09880d436b2e5ae96f51ead36 
> 
> Diff: https://reviews.apache.org/r/35820/diff/
> 
> 
> Testing
> -------
> 
> Tested on a test cluster with 3 Kafka brokers
> 
> 
> Thanks,
> 
> Ashish Singh
> 
>


Re: Review Request 35820: Patch for KAFKA-1367

Posted by Ashish Singh <as...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35820/#review90630
-----------------------------------------------------------



core/src/main/scala/kafka/controller/KafkaController.scala (line 42)
<https://reviews.apache.org/r/35820/#comment143754>

    Moved to method that uses it.


- Ashish Singh


On July 7, 2015, 5:04 a.m., Ashish Singh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35820/
> -----------------------------------------------------------
> 
> (Updated July 7, 2015, 5:04 a.m.)
> 
> 
> Review request for kafka.
> 
> 
> Bugs: KAFKA-1367
>     https://issues.apache.org/jira/browse/KAFKA-1367
> 
> 
> Repository: kafka
> 
> 
> Description
> -------
> 
> KAFKA-1367: Broker topic metadata not kept in sync with ZooKeeper
> 
> 
> Diffs
> -----
> 
>   core/src/main/scala/kafka/common/TopicAndPartition.scala df3db912f5daef6a25b4b2dd2220d2cc3795bce6 
>   core/src/main/scala/kafka/controller/KafkaController.scala 36350579b16027359d237b64699003358704ac6f 
>   core/src/main/scala/kafka/utils/ReplicationUtils.scala 60687332b4c9bee4d4c0851314cfb4b02d5d3489 
>   core/src/main/scala/kafka/utils/ZkUtils.scala 78475e3d5ec477cef00caeaa34ff2d196466be96 
>   core/src/test/scala/unit/kafka/integration/TopicMetadataTest.scala 995b05901491bb0dbf0df210d44bd1d7f66fdc82 
>   core/src/test/scala/unit/kafka/utils/ReplicationUtilsTest.scala c96c0ffd958d63c09880d436b2e5ae96f51ead36 
> 
> Diff: https://reviews.apache.org/r/35820/diff/
> 
> 
> Testing
> -------
> 
> Tested on a test cluster with 3 Kafka brokers
> 
> 
> Thanks,
> 
> Ashish Singh
> 
>


Re: Review Request 35820: Patch for KAFKA-1367

Posted by Ashish Singh <as...@cloudera.com>.

> On July 7, 2015, 4:43 p.m., Jun Rao wrote:
> > +1. Will fix the following during commit.

Thanks Jun!


- Ashish


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35820/#review90717
-----------------------------------------------------------


On July 7, 2015, 5:04 a.m., Ashish Singh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35820/
> -----------------------------------------------------------
> 
> (Updated July 7, 2015, 5:04 a.m.)
> 
> 
> Review request for kafka.
> 
> 
> Bugs: KAFKA-1367
>     https://issues.apache.org/jira/browse/KAFKA-1367
> 
> 
> Repository: kafka
> 
> 
> Description
> -------
> 
> KAFKA-1367: Broker topic metadata not kept in sync with ZooKeeper
> 
> 
> Diffs
> -----
> 
>   core/src/main/scala/kafka/common/TopicAndPartition.scala df3db912f5daef6a25b4b2dd2220d2cc3795bce6 
>   core/src/main/scala/kafka/controller/KafkaController.scala 36350579b16027359d237b64699003358704ac6f 
>   core/src/main/scala/kafka/utils/ReplicationUtils.scala 60687332b4c9bee4d4c0851314cfb4b02d5d3489 
>   core/src/main/scala/kafka/utils/ZkUtils.scala 78475e3d5ec477cef00caeaa34ff2d196466be96 
>   core/src/test/scala/unit/kafka/integration/TopicMetadataTest.scala 995b05901491bb0dbf0df210d44bd1d7f66fdc82 
>   core/src/test/scala/unit/kafka/utils/ReplicationUtilsTest.scala c96c0ffd958d63c09880d436b2e5ae96f51ead36 
> 
> Diff: https://reviews.apache.org/r/35820/diff/
> 
> 
> Testing
> -------
> 
> Tested on a test cluster with 3 Kafka brokers
> 
> 
> Thanks,
> 
> Ashish Singh
> 
>


Re: Review Request 35820: Patch for KAFKA-1367

Posted by Jun Rao <ju...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35820/#review90717
-----------------------------------------------------------

Ship it!


+1. Will fix the following during commit.


core/src/main/scala/kafka/controller/KafkaController.scala (lines 1329 - 1330)
<https://reviews.apache.org/r/35820/#comment143856>

    These can just be topicAndPartition("topic").asInstance[String]. Will fix this during commit.


- Jun Rao


On July 7, 2015, 5:04 a.m., Ashish Singh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35820/
> -----------------------------------------------------------
> 
> (Updated July 7, 2015, 5:04 a.m.)
> 
> 
> Review request for kafka.
> 
> 
> Bugs: KAFKA-1367
>     https://issues.apache.org/jira/browse/KAFKA-1367
> 
> 
> Repository: kafka
> 
> 
> Description
> -------
> 
> KAFKA-1367: Broker topic metadata not kept in sync with ZooKeeper
> 
> 
> Diffs
> -----
> 
>   core/src/main/scala/kafka/common/TopicAndPartition.scala df3db912f5daef6a25b4b2dd2220d2cc3795bce6 
>   core/src/main/scala/kafka/controller/KafkaController.scala 36350579b16027359d237b64699003358704ac6f 
>   core/src/main/scala/kafka/utils/ReplicationUtils.scala 60687332b4c9bee4d4c0851314cfb4b02d5d3489 
>   core/src/main/scala/kafka/utils/ZkUtils.scala 78475e3d5ec477cef00caeaa34ff2d196466be96 
>   core/src/test/scala/unit/kafka/integration/TopicMetadataTest.scala 995b05901491bb0dbf0df210d44bd1d7f66fdc82 
>   core/src/test/scala/unit/kafka/utils/ReplicationUtilsTest.scala c96c0ffd958d63c09880d436b2e5ae96f51ead36 
> 
> Diff: https://reviews.apache.org/r/35820/diff/
> 
> 
> Testing
> -------
> 
> Tested on a test cluster with 3 Kafka brokers
> 
> 
> Thanks,
> 
> Ashish Singh
> 
>


Re: Review Request 35820: Patch for KAFKA-1367

Posted by Ashish Singh <as...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35820/
-----------------------------------------------------------

(Updated July 7, 2015, 5:04 a.m.)


Review request for kafka.


Bugs: KAFKA-1367
    https://issues.apache.org/jira/browse/KAFKA-1367


Repository: kafka


Description
-------

KAFKA-1367: Broker topic metadata not kept in sync with ZooKeeper


Diffs (updated)
-----

  core/src/main/scala/kafka/common/TopicAndPartition.scala df3db912f5daef6a25b4b2dd2220d2cc3795bce6 
  core/src/main/scala/kafka/controller/KafkaController.scala 36350579b16027359d237b64699003358704ac6f 
  core/src/main/scala/kafka/utils/ReplicationUtils.scala 60687332b4c9bee4d4c0851314cfb4b02d5d3489 
  core/src/main/scala/kafka/utils/ZkUtils.scala 78475e3d5ec477cef00caeaa34ff2d196466be96 
  core/src/test/scala/unit/kafka/integration/TopicMetadataTest.scala 995b05901491bb0dbf0df210d44bd1d7f66fdc82 
  core/src/test/scala/unit/kafka/utils/ReplicationUtilsTest.scala c96c0ffd958d63c09880d436b2e5ae96f51ead36 

Diff: https://reviews.apache.org/r/35820/diff/


Testing
-------

Tested on a test cluster with 3 Kafka brokers


Thanks,

Ashish Singh


Re: Review Request 35820: Patch for KAFKA-1367

Posted by Ashish Singh <as...@cloudera.com>.

> On July 7, 2015, 12:36 a.m., Jun Rao wrote:
> > core/src/test/scala/unit/kafka/integration/TopicMetadataTest.scala, line 50
> > <https://reviews.apache.org/r/35820/diff/2/?file=997781#file997781line50>
> >
> >     This seems to be specific to testIsrAfterBrokerShutDownAndJoinsBack. Could we move it there?

KAFKA-972 also uses this. I think its best to have it initialized just once in setup. Let me know if you think otherwise.


> On July 7, 2015, 12:36 a.m., Jun Rao wrote:
> > core/src/test/scala/unit/kafka/integration/TopicMetadataTest.scala, line 143
> > <https://reviews.apache.org/r/35820/diff/2/?file=997781#file997781line143>
> >
> >     Can this be private?

It should be. Thanks for pointing out.


- Ashish


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35820/#review90605
-----------------------------------------------------------


On July 7, 2015, 5:04 a.m., Ashish Singh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35820/
> -----------------------------------------------------------
> 
> (Updated July 7, 2015, 5:04 a.m.)
> 
> 
> Review request for kafka.
> 
> 
> Bugs: KAFKA-1367
>     https://issues.apache.org/jira/browse/KAFKA-1367
> 
> 
> Repository: kafka
> 
> 
> Description
> -------
> 
> KAFKA-1367: Broker topic metadata not kept in sync with ZooKeeper
> 
> 
> Diffs
> -----
> 
>   core/src/main/scala/kafka/common/TopicAndPartition.scala df3db912f5daef6a25b4b2dd2220d2cc3795bce6 
>   core/src/main/scala/kafka/controller/KafkaController.scala 36350579b16027359d237b64699003358704ac6f 
>   core/src/main/scala/kafka/utils/ReplicationUtils.scala 60687332b4c9bee4d4c0851314cfb4b02d5d3489 
>   core/src/main/scala/kafka/utils/ZkUtils.scala 78475e3d5ec477cef00caeaa34ff2d196466be96 
>   core/src/test/scala/unit/kafka/integration/TopicMetadataTest.scala 995b05901491bb0dbf0df210d44bd1d7f66fdc82 
>   core/src/test/scala/unit/kafka/utils/ReplicationUtilsTest.scala c96c0ffd958d63c09880d436b2e5ae96f51ead36 
> 
> Diff: https://reviews.apache.org/r/35820/diff/
> 
> 
> Testing
> -------
> 
> Tested on a test cluster with 3 Kafka brokers
> 
> 
> Thanks,
> 
> Ashish Singh
> 
>


Re: Review Request 35820: Patch for KAFKA-1367

Posted by Jun Rao <ju...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35820/#review90605
-----------------------------------------------------------


Thanks for the patch. A few more comments below.


core/src/main/scala/kafka/controller/KafkaController.scala (line 42)
<https://reviews.apache.org/r/35820/#comment143710>

    Implicits can have unexpected side effects. Could we limit the scope of this by importing it in the context where conversion is actually used?



core/src/main/scala/kafka/utils/ReplicationUtils.scala (line 44)
<https://reviews.apache.org/r/35820/#comment143712>

    It's better to make this debug level.



core/src/test/scala/unit/kafka/integration/TopicMetadataTest.scala (line 45)
<https://reviews.apache.org/r/35820/#comment143732>

    This seems to be specific to testIsrAfterBrokerShutDownAndJoinsBack. Could we move it there?



core/src/test/scala/unit/kafka/integration/TopicMetadataTest.scala (line 138)
<https://reviews.apache.org/r/35820/#comment143713>

    Can this be private?



core/src/test/scala/unit/kafka/integration/TopicMetadataTest.scala (line 147)
<https://reviews.apache.org/r/35820/#comment143723>

    We should use foreach instead of map.



core/src/test/scala/unit/kafka/integration/TopicMetadataTest.scala (lines 149 - 163)
<https://reviews.apache.org/r/35820/#comment143731>

    Could we align the code a bit to make it more readable?



core/src/test/scala/unit/kafka/integration/TopicMetadataTest.scala (lines 152 - 154)
<https://reviews.apache.org/r/35820/#comment143730>

    It seems that we have to deal with the case of hostName being empty here too. It's probably simpler to just create BrokerEndPoint in the same way as in line 141.


- Jun Rao


On July 2, 2015, 12:23 a.m., Ashish Singh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35820/
> -----------------------------------------------------------
> 
> (Updated July 2, 2015, 12:23 a.m.)
> 
> 
> Review request for kafka.
> 
> 
> Bugs: KAFKA-1367
>     https://issues.apache.org/jira/browse/KAFKA-1367
> 
> 
> Repository: kafka
> 
> 
> Description
> -------
> 
> KAFKA-1367: Broker topic metadata not kept in sync with ZooKeeper
> 
> 
> Diffs
> -----
> 
>   core/src/main/scala/kafka/common/TopicAndPartition.scala df3db912f5daef6a25b4b2dd2220d2cc3795bce6 
>   core/src/main/scala/kafka/controller/KafkaController.scala 36350579b16027359d237b64699003358704ac6f 
>   core/src/main/scala/kafka/utils/ReplicationUtils.scala 60687332b4c9bee4d4c0851314cfb4b02d5d3489 
>   core/src/main/scala/kafka/utils/ZkUtils.scala 78475e3d5ec477cef00caeaa34ff2d196466be96 
>   core/src/test/scala/unit/kafka/integration/TopicMetadataTest.scala 995b05901491bb0dbf0df210d44bd1d7f66fdc82 
>   core/src/test/scala/unit/kafka/utils/ReplicationUtilsTest.scala c96c0ffd958d63c09880d436b2e5ae96f51ead36 
> 
> Diff: https://reviews.apache.org/r/35820/diff/
> 
> 
> Testing
> -------
> 
> Tested on a test cluster with 3 Kafka brokers
> 
> 
> Thanks,
> 
> Ashish Singh
> 
>


Re: Review Request 35820: Patch for KAFKA-1367

Posted by Ashish Singh <as...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35820/
-----------------------------------------------------------

(Updated July 2, 2015, 12:23 a.m.)


Review request for kafka.


Bugs: KAFKA-1367
    https://issues.apache.org/jira/browse/KAFKA-1367


Repository: kafka


Description
-------

KAFKA-1367: Broker topic metadata not kept in sync with ZooKeeper


Diffs (updated)
-----

  core/src/main/scala/kafka/common/TopicAndPartition.scala df3db912f5daef6a25b4b2dd2220d2cc3795bce6 
  core/src/main/scala/kafka/controller/KafkaController.scala 36350579b16027359d237b64699003358704ac6f 
  core/src/main/scala/kafka/utils/ReplicationUtils.scala 60687332b4c9bee4d4c0851314cfb4b02d5d3489 
  core/src/main/scala/kafka/utils/ZkUtils.scala 78475e3d5ec477cef00caeaa34ff2d196466be96 
  core/src/test/scala/unit/kafka/integration/TopicMetadataTest.scala 995b05901491bb0dbf0df210d44bd1d7f66fdc82 
  core/src/test/scala/unit/kafka/utils/ReplicationUtilsTest.scala c96c0ffd958d63c09880d436b2e5ae96f51ead36 

Diff: https://reviews.apache.org/r/35820/diff/


Testing
-------

Tested on a test cluster with 3 Kafka brokers


Thanks,

Ashish Singh


Re: Review Request 35820: Patch for KAFKA-1367

Posted by Ashish Singh <as...@cloudera.com>.

> On June 30, 2015, 4:42 p.m., Jun Rao wrote:
> > Thanks for the patch. A few comments below.
> > 
> > Also, could we add a unit test for this?

Thanks for the review Jun! Addressed your concerns and added a test that re-produces the issue and verifies the fix.


- Ashish


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35820/#review89911
-----------------------------------------------------------


On July 2, 2015, 12:23 a.m., Ashish Singh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35820/
> -----------------------------------------------------------
> 
> (Updated July 2, 2015, 12:23 a.m.)
> 
> 
> Review request for kafka.
> 
> 
> Bugs: KAFKA-1367
>     https://issues.apache.org/jira/browse/KAFKA-1367
> 
> 
> Repository: kafka
> 
> 
> Description
> -------
> 
> KAFKA-1367: Broker topic metadata not kept in sync with ZooKeeper
> 
> 
> Diffs
> -----
> 
>   core/src/main/scala/kafka/common/TopicAndPartition.scala df3db912f5daef6a25b4b2dd2220d2cc3795bce6 
>   core/src/main/scala/kafka/controller/KafkaController.scala 36350579b16027359d237b64699003358704ac6f 
>   core/src/main/scala/kafka/utils/ReplicationUtils.scala 60687332b4c9bee4d4c0851314cfb4b02d5d3489 
>   core/src/main/scala/kafka/utils/ZkUtils.scala 78475e3d5ec477cef00caeaa34ff2d196466be96 
>   core/src/test/scala/unit/kafka/integration/TopicMetadataTest.scala 995b05901491bb0dbf0df210d44bd1d7f66fdc82 
>   core/src/test/scala/unit/kafka/utils/ReplicationUtilsTest.scala c96c0ffd958d63c09880d436b2e5ae96f51ead36 
> 
> Diff: https://reviews.apache.org/r/35820/diff/
> 
> 
> Testing
> -------
> 
> Tested on a test cluster with 3 Kafka brokers
> 
> 
> Thanks,
> 
> Ashish Singh
> 
>


Re: Review Request 35820: Patch for KAFKA-1367

Posted by Jun Rao <ju...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35820/#review89911
-----------------------------------------------------------


Thanks for the patch. A few comments below.

Also, could we add a unit test for this?


core/src/main/scala/kafka/common/TopicAndPartition.scala (line 38)
<https://reviews.apache.org/r/35820/#comment142801>

    Perhaps we should add a version field in anticipation for future format evolution.



core/src/main/scala/kafka/controller/KafkaController.scala (lines 1302 - 1304)
<https://reviews.apache.org/r/35820/#comment142794>

    This needs to be done while holding a controller lock.



core/src/main/scala/kafka/controller/KafkaController.scala (line 1303)
<https://reviews.apache.org/r/35820/#comment142795>

    We should just update the isr cache for partitions that have changed.



core/src/main/scala/kafka/controller/KafkaController.scala (line 1307)
<https://reviews.apache.org/r/35820/#comment142792>

    Can this be private?



core/src/main/scala/kafka/controller/KafkaController.scala (line 1315)
<https://reviews.apache.org/r/35820/#comment142797>

    Can this be private?



core/src/main/scala/kafka/controller/KafkaController.scala (line 1327)
<https://reviews.apache.org/r/35820/#comment142799>

    Could we include the ZK path as well? Also, we probably should just log this as an error and then continue, instead of throwing an exception.



core/src/main/scala/kafka/utils/ReplicationUtils.scala (line 44)
<https://reviews.apache.org/r/35820/#comment142790>

    This probably should be debug.


- Jun Rao


On June 24, 2015, 5:10 a.m., Ashish Singh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35820/
> -----------------------------------------------------------
> 
> (Updated June 24, 2015, 5:10 a.m.)
> 
> 
> Review request for kafka.
> 
> 
> Bugs: KAFKA-1367
>     https://issues.apache.org/jira/browse/KAFKA-1367
> 
> 
> Repository: kafka
> 
> 
> Description
> -------
> 
> KAFKA-1367: Broker topic metadata not kept in sync with ZooKeeper
> 
> 
> Diffs
> -----
> 
>   core/src/main/scala/kafka/common/TopicAndPartition.scala df3db912f5daef6a25b4b2dd2220d2cc3795bce6 
>   core/src/main/scala/kafka/controller/KafkaController.scala 36350579b16027359d237b64699003358704ac6f 
>   core/src/main/scala/kafka/utils/ReplicationUtils.scala 60687332b4c9bee4d4c0851314cfb4b02d5d3489 
>   core/src/main/scala/kafka/utils/ZkUtils.scala 78475e3d5ec477cef00caeaa34ff2d196466be96 
>   core/src/test/scala/unit/kafka/utils/ReplicationUtilsTest.scala c96c0ffd958d63c09880d436b2e5ae96f51ead36 
> 
> Diff: https://reviews.apache.org/r/35820/diff/
> 
> 
> Testing
> -------
> 
> Tested on a test cluster with 3 Kafka brokers
> 
> 
> Thanks,
> 
> Ashish Singh
> 
>


Re: Review Request 35820: Patch for KAFKA-1367

Posted by Ashish Singh <as...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35820/
-----------------------------------------------------------

(Updated June 24, 2015, 5:10 a.m.)


Review request for kafka.


Bugs: KAFKA-1367
    https://issues.apache.org/jira/browse/KAFKA-1367


Repository: kafka


Description
-------

KAFKA-1367: Broker topic metadata not kept in sync with ZooKeeper


Diffs
-----

  core/src/main/scala/kafka/common/TopicAndPartition.scala df3db912f5daef6a25b4b2dd2220d2cc3795bce6 
  core/src/main/scala/kafka/controller/KafkaController.scala 36350579b16027359d237b64699003358704ac6f 
  core/src/main/scala/kafka/utils/ReplicationUtils.scala 60687332b4c9bee4d4c0851314cfb4b02d5d3489 
  core/src/main/scala/kafka/utils/ZkUtils.scala 78475e3d5ec477cef00caeaa34ff2d196466be96 
  core/src/test/scala/unit/kafka/utils/ReplicationUtilsTest.scala c96c0ffd958d63c09880d436b2e5ae96f51ead36 

Diff: https://reviews.apache.org/r/35820/diff/


Testing (updated)
-------

Tested on a test cluster with 3 Kafka brokers


Thanks,

Ashish Singh