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

refactor: remove function pg_sleep #2576

Merged
merged 1 commit into from
May 16, 2022
Merged

refactor: remove function pg_sleep #2576

merged 1 commit into from
May 16, 2022

Conversation

fuyufjh
Copy link
Member

@fuyufjh fuyufjh commented May 16, 2022

What's changed and what's your intention?

We currently use std::thread::sleep to implement pg_sleep, which will put the current thread to sleep. This may block other coroutines from running and reduce system throughput.

See also #2561 (comment)

Checklist

N/A

Refer to a related PR or issue link (optional)

closes #2561

@fuyufjh fuyufjh enabled auto-merge (squash) May 16, 2022 10:17
@codecov
Copy link

codecov bot commented May 16, 2022

Codecov Report

Merging #2576 (42f292d) into main (6fd6403) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2576      +/-   ##
==========================================
- Coverage   72.16%   72.15%   -0.01%     
==========================================
  Files         675      674       -1     
  Lines       88016    87971      -45     
==========================================
- Hits        63516    63475      -41     
+ Misses      24500    24496       -4     
Flag Coverage Δ
rust 72.15% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/expr/src/expr/expr_unary.rs 75.97% <ø> (+0.24%) ⬆️
src/expr/src/expr/mod.rs 47.61% <100.00%> (ø)
src/common/src/types/mod.rs 65.11% <0.00%> (-0.39%) ⬇️
src/meta/src/stream/stream_manager.rs 64.02% <0.00%> (+0.14%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@fuyufjh fuyufjh merged commit 034a626 into main May 16, 2022
@fuyufjh fuyufjh deleted the eric/remove_pg_sleep branch May 16, 2022 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

expr: pg_sleep should not put the thread to sleep
2 participants