[ 
https://issues.apache.org/jira/browse/SAMZA-458?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chris Riccomini updated SAMZA-458:
----------------------------------
    Attachment: SAMZA-458.2.patch

Attaching a slightly tweaked patch that changes SamzaException to include the 
exception as a second param, rather than a {{%s}} field in the message.

[~navina], I had a question about this line as well:

{code}
    sendFailed.set(false)
{code}

Is it safe to do this? I'm wondering if it's possible for sendFaield to be set 
to true, and then send is called again, where it's reset to false. I *think* 
that this shouldn't happen, since the Callback is only invoked from the main 
thread, not from Kafka's sender thread (since we have max retries set to 
Int.MAX). Correct?

Second question: if we ever get a RetriableException thrown, don't we go into 
an infinite loop? In this case, sendFailed is true, and we loop back around, 
where the first line in the loop is:

{code}
        if(sendFailed.get()) {
          throw exceptionThrown.get()
        }
{code}

I don't see how we escape this. I think we don't see this now because we never 
get RetriableExceptions because we have retries sent to Int.MAX.

> Close in KafkaSystemProducer should flush all source buffers
> ------------------------------------------------------------
>
>                 Key: SAMZA-458
>                 URL: https://issues.apache.org/jira/browse/SAMZA-458
>             Project: Samza
>          Issue Type: Bug
>          Components: kafka
>            Reporter: Chris Riccomini
>            Assignee: Yan Fang
>              Labels: newbie
>             Fix For: 0.9.0
>
>         Attachments: SAMZA-458.1.patch, SAMZA-458.2.patch, SAMZA-458.patch
>
>
> I noticed that calling KafkaSystemProducer.stop does not flush any 
> outstanding messages in the sourceBuffers array. Calling close should flush 
> all buffers. Without this, shutting down can cause messages to be dropped.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to