Skip to content
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

[Bugfix] Fix NPE caused by concurrent access #270

Merged
merged 2 commits into from
Aug 23, 2023

Conversation

banmoy
Copy link
Collaborator

@banmoy banmoy commented Aug 21, 2023

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Which issues of this PR fixes :

Fixes #

Problem Summary(Required) :

java.lang.NullPointerException: null;
at java.util.LinkedList$ListItr.next(LinkedList.java:893);
at com.starrocks.connector.flink.manager.StarRocksSinkManagerV2.lambda$init$0(StarRocksSinkManagerV2.java:158);

StreamLoadManagerV2#flushQ could be read and write concurrently, but it's a LinkedList which is not a concurrent data structure. We can replace it with ConcurrentLinkedQueue. At the same time, fix the potential concurrent problem for regions.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr will affect users' behaviors
  • This pr needs user documentation (for new or modified features or behaviors)
  • I have added documentation for my new feature or new function

@banmoy banmoy merged commit 4191fdc into StarRocks:main Aug 23, 2023
3 checks passed
banmoy added a commit to banmoy/starrocks-connector-for-apache-flink that referenced this pull request Aug 28, 2023
banmoy added a commit to banmoy/starrocks-connector-for-apache-flink that referenced this pull request Aug 28, 2023
banmoy added a commit to banmoy/starrocks-connector-for-apache-flink that referenced this pull request Aug 28, 2023
banmoy added a commit to banmoy/starrocks-connector-for-apache-flink that referenced this pull request Aug 28, 2023
banmoy added a commit that referenced this pull request Sep 11, 2023
banmoy added a commit that referenced this pull request Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants