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

compute_ctl: database_schema should keep process::Child as part of returned value #10273

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

prepor
Copy link
Contributor

@prepor prepor commented Jan 3, 2025

Problem

/database_schema endpoint returns incomplete output from pg_dump

Summary of changes

The Tokio process was not used properly. The returned stream does not include process::Child, and the process is scheduled to be killed immediately after the get_database_schema call when cmd goes out of scope.

A simple solution is to remove .kill_on_drop(true) and add cmd.await to the spawned task. While this approach should work fine, it forfeits the useful property of automatically killing unnecessary processes when HTTP connections are closed.

An alternative solution I propose is to return a special Stream implementation that retains process::Child.

What do you think? If the simpler solution is preferred, I can update this PR accordingly.

@prepor prepor requested a review from a team as a code owner January 3, 2025 17:45
@prepor prepor requested a review from kelvich January 3, 2025 17:45
Copy link

github-actions bot commented Jan 3, 2025

7260 tests run: 6895 passed, 0 failed, 365 skipped (full report)


Flaky tests (2)

Postgres 16

  • test_physical_replication_config_mismatch_max_locks_per_transaction: release-arm64

Postgres 15

Code coverage* (full report)

  • functions: 31.1% (8412 of 27008 functions)
  • lines: 47.8% (66788 of 139612 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
47a3cbd at 2025-01-09T13:44:16.257Z :recycle:

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