Hey there guys. So I have a flink cluster running ...
# troubleshooting
p
Hey there guys. So I have a flink cluster running with rocksdb state connected to a kafka source. When changing the broker/topic with a new deployment, the cluster fails with an exception trying to connect to the previous topic name. Has anyone encountered. this error before?
My initial impression is that something is stored in state that it’s trying to recover (maybe the offset?) and it fails to connect because the topic doesn’t exist on the new broker.
Does anyone have any ideas here? 🙂
j
if you change the topic or the brokers you will not be able to recover from state.. you can start the job without savepoint, or try to change the uid from source (dont know if this will work)
p
Isn’t there a way of ignoring state just for a single operator? Cause the entire flow doesn’t change, just the source of data.
If there isn’t, there isn’t and we’ll manage, but it’s weird I have to do a big bang on the entire state because I choose to consume from a different source.
j
that 'small change' depending the type of garantee you have (atleastonce, exactlyonce) can produce duplicated events or miss events breaking the garantee, you are changing a import part of job. but try to change the uid from source, it should detecte it as new source and should not try to recover from state.
p
Can the “allow non restored state” flag help here?
j
in this case I dont beleave, it will be deserealized and source is created correctly, the problem is that the topic dont exists..
but not sure
m
This is by design
If you want to change your input, add that source with a new UID assigned to id
And use the allow non restored state flag
p
Being it a new kafka cluster and a new topic, it should automatically have a new UID, right?
m
You always should set explicit UIDs
p
The operator identifier?
m
For all operators
p
For a
KafkaSource
is that the
sourceName
?
We are setting it with the
name
function for all operators except the source
p
Scratch that, we’re using the
uid
But not for the source
I guess it didn’t work, not even with the flag active… 😢
m
Have you added a new operator with a uid?
Or changed the existing one
I guess edited the existing one
Which is what you shouldn’t do
p
Guess so, we should had a uid to the source as well. Thanks Martijn 🙂
We weren’t expecting to change the kafka source ever…
But the company decided to move from an AWS MSK to Confluent Cloud…
m
Yes, uid all the operators indeed. You can still fix it though 🙂