Hi David, the obvious reason is that your state stored an enum value that is not present anymore. It tries to deserialize the 512. entry in your enum that is not available.
However, since it's highly unlikely that you actually have that many enum values in the same enum class, we are actually looking at a corrupt stream, which is hard to fix. Could you describe which state you have? Did you upgrade Flink or your application? If it's Flink, it's a bug. If it's application, it may be that state is incompatible and would need to be migrated. Did you restart from checkpoint or savepoint? On Thu, Mar 5, 2020 at 1:14 AM David Morin <morin.david....@gmail.com> wrote: > Hello, > > I have this Exception in my datastream app and I can't find the root cause. > I consume data from Kafka and it fails when I try to get a value from my > MapState in RocksDB. > It was working in previous release of my app but I can't find the cause of > this error. > > java.lang.ArrayIndexOutOfBoundsException: 512 > at > org.apache.flink.api.common.typeutils.base.EnumSerializer.deserialize(EnumSerializer.java:130) > at > org.apache.flink.api.common.typeutils.base.EnumSerializer.deserialize(EnumSerializer.java:50) > at > org.apache.flink.api.java.typeutils.runtime.TupleSerializer.deserialize(TupleSerializer.java:143) > at > org.apache.flink.api.java.typeutils.runtime.TupleSerializer.deserialize(TupleSerializer.java:37) > at > org.apache.flink.contrib.streaming.state.RocksDBMapState.deserializeUserValue(RocksDBMapState.java:344) > at > org.apache.flink.contrib.streaming.state.RocksDBMapState.get(RocksDBMapState.java:123) > at > org.apache.flink.runtime.state.UserFacingMapState.get(UserFacingMapState.java:47) > .. > > Flink version: 1.9.2 > > >