0

I'm experiencing an issue with state management in my Flink job:

I have two Kafka sources that I'm unioning together and the second source uses a tumbling window based on processing time. I'm using RocksDB as the state backend In the Flink UI dashboard, I notice there are no watermarks enabled for this particular union/group by and I suspect the windows are never expiring from state My event time isn't critically important, so I don't want to use watermarks or tumble based on event time. While I could take savepoints periodically as a workaround, I'd prefer to understand what's happening first.

Any suggestions on how to debug this state expiration issue with processing time windows?

asked May 9, 2025 at 16:02

1 Answer 1

0

What makes you think there's an issue with the state? With RocksDB, state that has been deleted can take some time to actually be compacted and freed. By default, I believe compaction begins somewhere around 400MB.

answered May 10, 2025 at 0:34
Sign up to request clarification or add additional context in comments.

2 Comments

The cpu utilization hits 100% maximum (70% average) as the state goes over 200mb. I actually thought compaction starts around 200mb. I think there is an issue with state because my sources, and keyed operation take kbs whereas my group window aggregate (union using proc time) takes close to 99% of the state size. I am not sure how do I expire state for proc time windows though i did verify the start and end of window is whatever I set the tumble proc time to be
You don't have to do anything to expire state for proc time windows. Their state is automatically freed when the window ends, unless you have done something with globalState.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.