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

avoid deadlock when calling s3async callback, issue #1854 #1874

Merged
merged 1 commit into from
Sep 7, 2022
Merged

avoid deadlock when calling s3async callback, issue #1854 #1874

merged 1 commit into from
Sep 7, 2022

Conversation

h0hmj
Copy link
Contributor

@h0hmj h0hmj commented Aug 30, 2022

Signed-off-by: h0hmj [email protected]

What problem does this PR solve?

Issue Number: #1854

Problem Summary:

What is changed and how it works?

What's Changed:

add a work queue and a thread to handle async s3 request

How it Works:

move throttle check outside main loop, async s3 request will not block main loop

Side effects(Breaking backward compatibility? Performance regression?):

Check List

  • Relevant documentation/comments is changed or added
  • I acknowledge that all my contributions will be made under the project's license

@h0hmj h0hmj requested review from wu-hanqing and wuhongsong August 30, 2022 07:47
@h0hmj
Copy link
Contributor Author

h0hmj commented Sep 1, 2022

recheck

@h0hmj
Copy link
Contributor Author

h0hmj commented Sep 5, 2022

let callbacks run in a separate thread rather than the event main loop to avoid deadlock.
num of callback ~= num of request (limited by inflight bytes)

src/common/s3_adapter.h Show resolved Hide resolved
src/common/s3_adapter.cpp Outdated Show resolved Hide resolved
@h0hmj h0hmj merged commit 76bb43d into opencurve:master Sep 7, 2022
@h0hmj h0hmj deleted the patch-0830 branch May 30, 2023 07:10
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