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

[Improve] Fix the problem caused by very small interval in batch mode #462

Merged
merged 18 commits into from
Aug 15, 2024

Conversation

JNSimba
Copy link
Member

@JNSimba JNSimba commented Aug 6, 2024

Proposed changes

Issue Number: close #xxx

Problem Summary:

Optimize data writing in batch mode

  1. When the interval is small, streamload will occur frequently. When the amount of data is large, it will cause small writes and back pressure.
    Optimized to: schedule thread will not trigger writing when the queue is full
  2. Adjust the default values ​​of sink.buffer-flush.max-rows and sink.buffer-flush.max-bytes to 50w and 100MB respectively, and the minimum number of imports (1w) and bytes (10MB) are limited
  3. Add back pressure strategy. When the data accumulated in memory exceeds maxBlockByte, block data writing to prevent OOM of flink program
  4. The load asynchronous import thread will take out the data in the queue at one time, merge multiple buffers into one buffer, and increase the import throughput.

Checklist(Required)

  1. Does it affect the original behavior: (Yes/No/I Don't know)
  2. Has unit tests been added: (Yes/No/No Need)
  3. Has document been added or modified: (Yes/No/No Need)
  4. Does it need to update dependencies: (Yes/No)
  5. Are there any changes that cannot be rolled back: (Yes/No)

Further comments

If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...

Copy link
Contributor

@caoliang-web caoliang-web left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

CalvinKirs
CalvinKirs previously approved these changes Aug 8, 2024
@JNSimba JNSimba merged commit 411020a into apache:master Aug 15, 2024
6 checks passed
@JNSimba JNSimba mentioned this pull request Aug 27, 2024
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.

3 participants