-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FLINK-33201][Connectors/Kafka] Fix memory leak in CachingTopicSelector #55
[FLINK-33201][Connectors/Kafka] Fix memory leak in CachingTopicSelector #55
Conversation
Thanks for opening this pull request! Please check out our contributing guidelines. (https://flink.apache.org/contributing/how-to-contribute.html) |
f5ae323
to
112e8fa
Compare
@qbx2 Can you please rebase your PR? |
112e8fa
to
d024a40
Compare
@MartijnVisser Sure, I just rebased it. |
@MartijnVisser Could you please review? |
Hey All- We're experiencing some memory issues and wondering if this could be the cause. Will this PR be reviewed soon? @MartijnVisser @tzulitai |
@AHeise Can you take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I will run the test to make sure nothing happens.
Oh I see the tests can't be run because it's based on an old branch. I'm rebasing myself. |
What is the purpose of the change
In the CachingTopicSelector, a memory leak may occur when the internal logic fails to check the cache size due to a race condition. (
flink-connector-kafka/flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/sink/KafkaRecordSerializationSchemaBuilder.java
Lines 287 to 289 in d89a082
This PR fixes the memory leak by modifying the logic to be more resilient to failure.
Brief change log
Fix memory leak in CachingTopicSelector that can be triggered by race condition.
Verifying this change