Re: [DISCUSS] KIP-596 Safely abort Producer transactions during application shutdown

2020-05-14 Thread Boyang Chen
Hey Xiang, since Matthias is agreeing, do you want to kick off the vote? Boyang On Fri, May 8, 2020 at 4:20 PM Matthias J. Sax wrote: > >> I'm not sure I follow your question, the producer will not automatically > >> close when there is fatal error IIUC. > > Correct. I found the code example j

Re: [DISCUSS] KIP-596 Safely abort Producer transactions during application shutdown

2020-05-08 Thread Matthias J. Sax
>> I'm not sure I follow your question, the producer will not automatically >> close when there is fatal error IIUC. Correct. I found the code example just a little bit confusing, because the produce is only closed in case of an error and only if the exception is fatal. Overall, the code example

Re: [DISCUSS] KIP-596 Safely abort Producer transactions during application shutdown

2020-05-05 Thread Boyang Chen
Hey Matthias, I'm not sure I follow your question, the producer will not automatically close when there is fatal error IIUC. Boyang On Tue, May 5, 2020 at 6:16 PM 张祥 wrote: > Thanks for the comment Matthias. > > In fact, I cannot think of why we cannot close the producer no matter what. > On t

Re: [DISCUSS] KIP-596 Safely abort Producer transactions during application shutdown

2020-05-05 Thread 张祥
Thanks for the comment Matthias. In fact, I cannot think of why we cannot close the producer no matter what. On the other hand, it is also okay to reuse the producer when the error is not fatal. @Guozhang Wang @Boyang Chen Matthias J. Sax 于2020年5月1日周五 上午7:52写道: > Thanks for the KIP. Make sen

Re: [DISCUSS] KIP-596 Safely abort Producer transactions during application shutdown

2020-04-30 Thread Matthias J. Sax
Thanks for the KIP. Make sense to me. I think you can start a vote. One minor comment about the code example: From my understanding, a producer should always be closed (independent if there was no error, a transient error, or a fatal error). If that is correct, than the code example seems to be mi

Re: [DISCUSS] KIP-596 Safely abort Producer transactions during application shutdown

2020-04-25 Thread 张祥
Sorry, but this KIP is still open to discussion, any comments and ideas would be appreciated, Thanks. 张祥 于2020年4月17日周五 下午1:04写道: > Guozhang, thanks for the valuable suggestion. > > A new part called "suggested coding pattern" has been added and I copy the > core code here: > > try { > produc

Re: [DISCUSS] KIP-596 Safely abort Producer transactions during application shutdown

2020-04-16 Thread 张祥
Guozhang, thanks for the valuable suggestion. A new part called "suggested coding pattern" has been added and I copy the core code here: try { producer.beginTransaction(); for (int i = 0; i < 100; i++) producer.send(new ProducerRecord<>("my-topic", Integer.toString(i), Integer.toS

Re: [DISCUSS] KIP-596 Safely abort Producer transactions during application shutdown

2020-04-16 Thread Guozhang Wang
Xiang, thanks for the written KIP. I just have one meta comment and otherwise it looks good to me: could you also add a section about suggested coding patterns (especially how try - catch should be implemented) as we discussed on the JIRA to the wiki page as well? And please also note that besides

Re: [DISCUSS] KIP-596 Safely abort Producer transactions during application shutdown

2020-04-16 Thread 张祥
Thanks for the structure change Boyang. And I agree with you on the weak proposal part, I have adjusted it according to your suggestion. Thanks again! Boyang Chen 于2020年4月16日周四 下午2:39写道: > Thanks for the KIP Xiang! > > I think the motivation looks good, and I just did a slight structure change >

Re: [DISCUSS] KIP-596 Safely abort Producer transactions during application shutdown

2020-04-15 Thread Boyang Chen
Thanks for the KIP Xiang! I think the motivation looks good, and I just did a slight structure change to separate "Proposed Changes" and "Public Interfaces", hope you don't mind. However, "we can determine whether the producer client is already in error state in abortTransaction" sounds a bit wea

[DISCUSS] KIP-596 Safely abort Producer transactions during application shutdown

2020-04-15 Thread 张祥
Hi everyone, I have opened a small KIP about safely aborting transaction during shutdown. I'd like to use this thread to discuss about it and any feedback is appreciated (sorry for earlier KIP number mistake). Here is a link to KIP-596 : https://cwiki.apache.org/confluence/display/KAFKA/KIP-596%3A