vcrfxia commented on PR #13264:
URL: https://github.com/apache/kafka/pull/13264#issuecomment-1451404037

   > There is test failures. Could it be related to this PR?
   
   Good catch. These failures only appeared when I switched from the original 
try-catch approach for casting stores to either TimestampedKeyValueStore or 
VersionedKeyValueStore, to fetching the store as a generic StateStore and then 
performing `instanceof` checks. The failures happened because the unit tests 
use a mock context which returns null for the state store, which failed the 
`instanceof` checks. I'm pretty sure in the actual code (non-mocked contexts) 
it's not possible for `context.getStateStore()` to return null and therefore 
this "issue" is limited to unit tests only, but I've updated the PR to return 
to the original try-catch approach for casting in order to be safe (and in 
light of your other comment above, regarding type casts on every `put/get` 
call).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to