I have some jobs where I can configure the TTL dur...
# troubleshooting
s
I have some jobs where I can configure the TTL duration for certain operator states. The problem I'm noticing is that when I make changes in the TTL configuration the new state descriptor becomes incompatible and I cannot restart my jobs from current savepoints. Is that expected? More precisely, I'm using this when the duration (
myConfig.durationTTL()
) is greater than zero:
Copy code
newBuilder(Time.fromDuration(myConfig.durationTTL()))
          .setUpdateType(StateTtlConfig.UpdateType.OnCreateAndWrite)
          .setStateVisibility(StateTtlConfig.StateVisibility.NeverReturnExpired)
          .build();
and this otherwise for the disabled case:
Copy code
newBuilder(Time.milliseconds(Long.MAX_VALUE))
          .setUpdateType(StateTtlConfig.UpdateType.Disabled)
          .build();
What I'd like is to never break the state regardless of the duration value. Is it possible to reconcile these cases?
p
Are you naming the steps of your pipeline?
s
You mean specifying
uids
for the operators? Yeah...
In the docs it's claimed:
Copy code
The TTL configuration is not part of check- or savepoints but rather a way of how Flink treats it in the currently running job.
so the TTL config should not break savepoints...