Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
1.2.0
-
None
Description
Currently it is not possible to register an internal timer service in one job and remove it after a savepoint as a nullpointer exception is thrown in the next savepoint:
Caused by: java.lang.Exception: Could not write timer service of MyOperator (17/60) to checkpoint state stream.
at org.apache.flink.streaming.api.operators.AbstractStreamOperator.snapshotState(AbstractStreamOperator.java:418)
at com.king.rbea.backend.operators.scriptexecution.RBEAOperator.snapshotState(RBEAOperator.java:327)
at org.apache.flink.streaming.api.operators.AbstractStreamOperator.snapshotState(AbstractStreamOperator.java:357)
... 13 more
Caused by: java.lang.NullPointerException
at org.apache.flink.streaming.api.operators.HeapInternalTimerService.snapshotTimersForKeyGroup(HeapInternalTimerService.java:294)
at org.apache.flink.streaming.api.operators.AbstractStreamOperator.snapshotState(AbstractStreamOperator.java:414)
... 15 more
The timer serializer is null in this case as the timer service has never been started properly.
We should probably discard the timers for the services that are not reregistered after restore so we can get rid of the state completely.