> Is leadership rebalance a safe operation?

Yes - we use it routinely. For any partition, there should only be a
brief (order of seconds) period of rejected messages as leaders move.
When that happens the client should refresh metadata and discover the
new leader. Are you using the Java producer? Do you see any errors in
the producer logs?

On Wed, Jan 14, 2015 at 06:36:27PM -0800, Allen Wang wrote:
> Hello,
> 
> We did a manual leadership rebalance (using
> PreferredReplicaLeaderElectionCommand) under heavy load and found that
> there is a significant drop of incoming messages to the broker cluster for
> more than an hour. Looking at broker log, we found a lot of errors like
> this:
> 
> 2015-01-15 00:00:03,330 ERROR kafka.utils.Logging$class:103
> [kafka-processor-7101-0] [error] Closing socket for /10.213.156.41
> because of error
> java.io.IOException: Connection reset by peer
>       at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
>       at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
>       at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
>       at sun.nio.ch.IOUtil.read(IOUtil.java:197)
>       at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379)
>       at kafka.utils.Utils$.read(Utils.scala:375)
>       at 
> kafka.network.BoundedByteBufferReceive.readFrom(BoundedByteBufferReceive.scala:54)
>       at kafka.network.Processor.read(SocketServer.scala:347)
>       at kafka.network.Processor.run(SocketServer.scala:245)
>       at java.lang.Thread.run(Thread.java:745)
> 
> 
> Is leadership rebalance a safe operation?
> 
> Thanks.

Reply via email to