Current state: Under Discussion
Discussion thread: here
JIRA:
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
Currently, IQ throws InvalidStateStoreException for any types of error, that means a user cannot handle different types of error.
Because of that, we should throw different exceptions for each type.
To distinguish different types of error, we need to handle all InvalidStateStoreExceptions better during these public methods invoked. The main change is to introduce new exceptions that extend from InvalidStateStoreException. InvalidStateStoreException is not thrown at all anymore, but only new sub-classes.
# Two category exceptions public class RetryableStateStoreException extends InvalidStateStoreException public class FatalStateStoreException extends InvalidStateStoreException # Retryable exceptions public class StreamsNotStartedException extends RetryableStateStoreException public class StreamsRebalancingException extends RetryableStateStoreException public class StateStoreMigratedException extends RetryableStateStoreException # Fatal exceptions public class StreamsNotRunningException extends FatalStateStoreException public class StateStoreNotAvailableException extends FatalStateStoreException public class UnknownStateStoreException extends FatalStateStoreException |
Various state store exceptions can classify into two category exceptions: RetryableStateStoreException and FatalStateStoreException. The user can use the two exceptions if they only need to distinguish whether it can retry.
The following is the public methods that users will call to get state store instance:
Throw exceptions: StreamsNotStartedException, StreamsRebalancingException, StreamsNotRunningException, UnknownStateStoreException |
The following is the public methods that users will call to get store values:
fetch(key, from, to)
All the above methods could be throw following exceptions: StreamsRebalancingException, StateStoreMigratedException, StreamsNotRunningException, StateStoreNotAvailableException |
None.