[jira] [Commented] (KAFKA-9471) Return empty collection for PENDING_SHUTDOWN

2020-01-23 Thread Ted Yu (Jira)


[ 
https://issues.apache.org/jira/browse/KAFKA-9471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17022589#comment-17022589
 ] 

Ted Yu commented on KAFKA-9471:
---

I will send out a PR soon alone the above line of thinking.

> Return empty collection for PENDING_SHUTDOWN
> 
>
> Key: KAFKA-9471
> URL: https://issues.apache.org/jira/browse/KAFKA-9471
> Project: Kafka
>  Issue Type: Improvement
>  Components: streams
>Reporter: Ted Yu
>Assignee: Ted Yu
>Priority: Minor
>
> In StreamThreadStateStoreProvider we have:
> {code}
> if (streamThread.state() == StreamThread.State.DEAD) {
> return Collections.emptyList();
> {code}
> PENDING_SHUTDOWN is precursor to DEAD state.
> PENDING_SHUTDOWN should be treated the same way as DEAD.
> This makes more sense than current behavior of throwing exception for 
> PENDING_SHUTDOWN.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (KAFKA-9471) Return empty collection for PENDING_SHUTDOWN

2020-01-23 Thread Vito Jeng (Jira)


[ 
https://issues.apache.org/jira/browse/KAFKA-9471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17022586#comment-17022586
 ] 

Vito Jeng commented on KAFKA-9471:
--

Thanks [~yuzhih...@gmail.com] point this.

In KIP-216, we handle state store related exception based on Streams state, not 
StreamThread state. IMHO, I think we should throw exception rather than empty 
list and user cannot retry anymore.

> Return empty collection for PENDING_SHUTDOWN
> 
>
> Key: KAFKA-9471
> URL: https://issues.apache.org/jira/browse/KAFKA-9471
> Project: Kafka
>  Issue Type: Improvement
>  Components: streams
>Reporter: Ted Yu
>Assignee: Ted Yu
>Priority: Minor
>
> In StreamThreadStateStoreProvider we have:
> {code}
> if (streamThread.state() == StreamThread.State.DEAD) {
> return Collections.emptyList();
> {code}
> PENDING_SHUTDOWN is precursor to DEAD state.
> PENDING_SHUTDOWN should be treated the same way as DEAD.
> This makes more sense than current behavior of throwing exception for 
> PENDING_SHUTDOWN.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (KAFKA-9471) Return empty collection for PENDING_SHUTDOWN

2020-01-23 Thread Matthias J. Sax (Jira)


[ 
https://issues.apache.org/jira/browse/KAFKA-9471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17022400#comment-17022400
 ] 

Matthias J. Sax commented on KAFKA-9471:


Considering KIP-216, I think we need to make sure we throw an exception if 
`KafkaStream` state is DEAD or PENDING_SHUTDOWN or ERROR.

This ticket is about `StreamThread` state though. Not sure why we return an 
emptyList for state DEAD but throw an exception for all others states (except 
RUNNING). \cc [~vitojeng] who works on KIP-216.

> Return empty collection for PENDING_SHUTDOWN
> 
>
> Key: KAFKA-9471
> URL: https://issues.apache.org/jira/browse/KAFKA-9471
> Project: Kafka
>  Issue Type: Improvement
>  Components: streams
>Reporter: Ted Yu
>Assignee: Ted Yu
>Priority: Minor
>
> In StreamThreadStateStoreProvider we have:
> {code}
> if (streamThread.state() == StreamThread.State.DEAD) {
> return Collections.emptyList();
> {code}
> PENDING_SHUTDOWN is precursor to DEAD state.
> PENDING_SHUTDOWN should be treated the same way as DEAD.
> This makes more sense than current behavior of throwing exception for 
> PENDING_SHUTDOWN.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (KAFKA-9471) Return empty collection for PENDING_SHUTDOWN

2020-01-23 Thread Ted Yu (Jira)


[ 
https://issues.apache.org/jira/browse/KAFKA-9471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17022373#comment-17022373
 ] 

Ted Yu commented on KAFKA-9471:
---

[~mjsax][~guozhang]
Please comment.

> Return empty collection for PENDING_SHUTDOWN
> 
>
> Key: KAFKA-9471
> URL: https://issues.apache.org/jira/browse/KAFKA-9471
> Project: Kafka
>  Issue Type: Improvement
>Reporter: Ted Yu
>Assignee: Ted Yu
>Priority: Minor
>
> In StreamThreadStateStoreProvider we have:
> {code}
> if (streamThread.state() == StreamThread.State.DEAD) {
> return Collections.emptyList();
> {code}
> PENDING_SHUTDOWN is precursor to DEAD state.
> PENDING_SHUTDOWN should be treated the same way as DEAD.
> This makes more sense than current behavior of throwing exception for 
> PENDING_SHUTDOWN.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)