[ https://issues.apache.org/jira/browse/KAFKA-5876?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
A. Sophie Blee-Goldman updated KAFKA-5876: ------------------------------------------ Description: Currently, IQ does only throws {{InvalidStateStoreException}} for all errors that occur. However, we have different types of errors and should throw different exceptions for those types. For example, if a store was migrated it must be rediscovered while if a store cannot be queried yet, because it is still re-created after a rebalance, the user just needs to wait until store recreation is finished. There might be other examples, too. The following exceptions have been proposed in KIP-216: * *StreamsN**otStartedException ([DONE|https://github.com/apache/kafka/pull/10597])*: will be thrown when stream thread state is _CREATED_, the user can retry until to _RUNNING._ * *StreamsRebalancingException*: will be thrown when stream thread is not running and stream state is _REBALANCING_, the user just retry and wait until rebalance finished (_RUNNING_). * *StateStoreMigratedException*: will be thrown when state store already closed and stream state is _RUNNING_. The user need to rediscover the store and cannot blindly retry as the store handle is invalid and a new store handle must be retrieved. * *StateStoreNotAvailableException*: will be thrown when state store closed and stream state is _PENDING_SHUTDOWN_ / _NOT_RUNNING_ / _ERROR_. The user cannot retry when this exception is thrown. * *UnknownStateStoreException ([DONE|https://github.com/apache/kafka/pull/9821])*: will be thrown when passing an unknown state store. The user cannot retry when this exception is thrown. * *InvalidStateStorePartitionException ([DONE|https://github.com/apache/kafka/pull/10657])*: will be thrown when user requested partition is not available on the stream instance. was: Currently, IQ does only throws {{InvalidStateStoreException}} for all errors that occur. However, we have different types of errors and should throw different exceptions for those types. For example, if a store was migrated it must be rediscovered while if a store cannot be queried yet, because it is still re-created after a rebalance, the user just needs to wait until store recreation is finished. There might be other examples, too. > IQ should throw different exceptions for different errors > --------------------------------------------------------- > > Key: KAFKA-5876 > URL: https://issues.apache.org/jira/browse/KAFKA-5876 > Project: Kafka > Issue Type: Task > Components: streams > Reporter: Matthias J. Sax > Assignee: Vito Jeng > Priority: Major > Labels: needs-kip, newbie++ > > Currently, IQ does only throws {{InvalidStateStoreException}} for all errors > that occur. However, we have different types of errors and should throw > different exceptions for those types. > For example, if a store was migrated it must be rediscovered while if a store > cannot be queried yet, because it is still re-created after a rebalance, the > user just needs to wait until store recreation is finished. > There might be other examples, too. > The following exceptions have been proposed in KIP-216: > * *StreamsN**otStartedException > ([DONE|https://github.com/apache/kafka/pull/10597])*: will be thrown when > stream thread state is _CREATED_, the user can retry until to _RUNNING._ > * *StreamsRebalancingException*: will be thrown when stream thread is not > running and stream state is _REBALANCING_, the user just retry and wait until > rebalance finished (_RUNNING_). > * *StateStoreMigratedException*: will be thrown when state store already > closed and stream state is _RUNNING_. The user need to rediscover the store > and cannot blindly retry as the store handle is invalid and a new store > handle must be retrieved. > * *StateStoreNotAvailableException*: will be thrown when state store closed > and stream state is _PENDING_SHUTDOWN_ / _NOT_RUNNING_ / _ERROR_. The user > cannot retry when this exception is thrown. > * *UnknownStateStoreException > ([DONE|https://github.com/apache/kafka/pull/9821])*: will be thrown when > passing an unknown state store. The user cannot retry when this exception is > thrown. > * *InvalidStateStorePartitionException > ([DONE|https://github.com/apache/kafka/pull/10657])*: will be thrown when > user requested partition is not available on the stream instance. -- This message was sent by Atlassian Jira (v8.3.4#803005)