> On Feb. 10, 2015, 10:58 p.m., Joel Koshy wrote:
> > clients/src/main/java/org/apache/kafka/common/errors/NotEnoughReplicasAfterAppendException.java,
> >  line 24
> > <https://reviews.apache.org/r/29647/diff/2/?file=821997#file821997line24>
> >
> >     I think our interpretation of retriable is as follows (but we can 
> > discuss on the list if that needs to change): if the produce request hits 
> > an error, and there is absolutely no point in retrying then that is a 
> > non-retriable error. MessageSizeTooLarge is an example - since unless the 
> > producer changes the request to make the messages smaller there is no point 
> > in retrying.

This interpetation is not supported by code...

The new producer *will retry* on every retriable exception (see completeBatch() 
and canRetry() logic).
On the other hand, the client code using the producer is free to retry or not 
on any error.

We basically have 3 categories here:
1. Retrying may fix an issue and doesn't have any side-effects (for example, 
LeaderNotAvailable)
2. Retrying will never work, no point in trying (MessageTooLarge)
3. Retrying may fix the error but also has side-effects 
(NotEnoughReplicasAfterAppendException)

I'm pretty sure we don't want to automatically retry errors of category #3, but 
leave those up to the client.

And currently the only way to do it is not make them Retriable. 

We can take this to the mailing list of you want to discuss farther.


- Gwen


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


On Jan. 14, 2015, 11:41 p.m., Gwen Shapira wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29647/
> -----------------------------------------------------------
> 
> (Updated Jan. 14, 2015, 11:41 p.m.)
> 
> 
> Review request for kafka.
> 
> 
> Bugs: KAFKA-1697
>     https://issues.apache.org/jira/browse/KAFKA-1697
> 
> 
> Repository: kafka
> 
> 
> Description
> -------
> 
> trivial change to add byte serializer to ProducerPerformance; patched by Jun 
> Rao
> 
> 
> KAFKA-1723 (delta patch to fix javadoc); make the metrics name in new 
> producer more standard; patched by Manikumar Reddy; reviewed by Jun Rao
> 
> 
> removed broker code for handling acks>1 and made 
> NotEnoughReplicasAfterAppendException non-retriable
> 
> 
> added early handling of invalid number of acks to handler and a test
> 
> 
> Diffs
> -----
> 
>   
> clients/src/main/java/org/apache/kafka/common/errors/InvalidRequiredAcksException.java
>  PRE-CREATION 
>   
> clients/src/main/java/org/apache/kafka/common/errors/NotEnoughReplicasAfterAppendException.java
>  75c80a97e43089cb3f924a38f86d67b5a8dd2b89 
>   clients/src/main/java/org/apache/kafka/common/protocol/Errors.java 
> 3316b6a1098311b8603a4a5893bf57b75d2e43cb 
>   core/src/main/scala/kafka/cluster/Partition.scala 
> b230e9a1fb1a3161f4c9d164e4890a16eceb2ad4 
>   core/src/main/scala/kafka/server/KafkaApis.scala 
> c011a1b79bd6c4e832fe7d097daacb0d647d1cd4 
>   core/src/test/scala/unit/kafka/api/RequestResponseSerializationTest.scala 
> cd16ced5465d098be7a60498326b2a98c248f343 
>   core/src/test/scala/unit/kafka/api/testKafkaApis.scala PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/29647/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Gwen Shapira
> 
>

Reply via email to