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

fix(pageserver): run psql in thread to avoid blocking #10177

Merged
merged 3 commits into from
Dec 19, 2024
Merged

Conversation

skyzh
Copy link
Member

@skyzh skyzh commented Dec 17, 2024

Problem

ref #10170
ref #9994

The psql command will block the main thread, causing other async tasks to timeout (i.e., HTTP connect). Therefore, we need to move it to an I/O executor thread.

Summary of changes

  • run psql connection in a thread

@skyzh skyzh force-pushed the skyzh/non-block-psql branch from c05fd78 to 7f06138 Compare December 17, 2024 19:05
Copy link

github-actions bot commented Dec 17, 2024

7095 tests run: 6796 passed, 0 failed, 299 skipped (full report)


Flaky tests (1)

Postgres 17

Code coverage* (full report)

  • functions: 31.3% (8397 of 26831 functions)
  • lines: 48.0% (66647 of 138896 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
ee7d984 at 2024-12-18T18:14:20.780Z :recycle:

@skyzh skyzh force-pushed the skyzh/non-block-psql branch from 29f6244 to 395cc4a Compare December 18, 2024 04:56
@skyzh skyzh requested a review from jcsp December 18, 2024 04:59
@jcsp
Copy link
Collaborator

jcsp commented Dec 18, 2024

I merged #10185 into this PR to test the combination of the two

@skyzh
Copy link
Member Author

skyzh commented Dec 18, 2024

seems to work fine? I'll fix the style issue and rerun

@skyzh skyzh force-pushed the skyzh/non-block-psql branch from fd8a0ce to 105fe64 Compare December 18, 2024 17:07
skyzh and others added 3 commits December 18, 2024 12:08
Co-Authored-By: John Spray <john@neon.tech>
Signed-off-by: Alex Chi Z <chi@neon.tech>
Signed-off-by: Alex Chi Z <chi@neon.tech>
Signed-off-by: Alex Chi Z <chi@neon.tech>
@skyzh skyzh force-pushed the skyzh/non-block-psql branch from 105fe64 to ee7d984 Compare December 18, 2024 17:08
@skyzh skyzh requested a review from jcsp December 18, 2024 17:08
@jcsp jcsp added this pull request to the merge queue Dec 19, 2024
Merged via the queue into main with commit cc138b5 Dec 19, 2024
82 checks passed
@jcsp jcsp deleted the skyzh/non-block-psql branch December 19, 2024 09:47
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