Skip to content

Conversation

@yihong0618
Copy link
Contributor

Which issue does this PR close?

Closes #6855

Rationale for this change

What changes are included in this PR?

all python method use https://pyo3.rs/v0.27.1/parallelism.html
also add tests for it
before the patch the gil tests are failed

after this patch gil tests passed

let see what will happen in CI

Are there any user-facing changes?

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. releases-note/fix The PR fixes a bug or has a title that begins with "fix" labels Dec 3, 2025
@yihong0618
Copy link
Contributor Author

@messense I am not sure its fully right can you help to check? Thank you very much

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
@yihong0618 yihong0618 marked this pull request as draft December 3, 2025 12:07
Copy link
Member

@messense messense left a comment

Choose a reason for hiding this comment

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

Makes sense, I think generally we should release GIL when doing potential time consuming network requests, so most Operator methods should also do this.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 3, 2025
Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

Thank you for working on this!

There are two concerns so far:

  • I used to expect that our Rust code wouldn’t be tied to the Py GIL by default, but it seems it is. We could use more details on this.
  • Having py.detach everywhere doesn’t seem ideal. Let’s find a way to make it more maintainable.

@yihong0618
Copy link
Contributor Author

yes I need to reproducer does on a real env, to make that a responsibility fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer releases-note/fix The PR fixes a bug or has a title that begins with "fix" size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: opendal python could hang while file.write

3 participants