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: drain completed page_service connections #8632

Merged
merged 6 commits into from
Aug 7, 2024

Conversation

koivunej
Copy link
Member

@koivunej koivunej commented Aug 7, 2024

We've noticed increased memory usage with the latest release. Drain the joinset of page_service connection handlers to avoid leaking them until shutdown. An alternative would be to use a TaskTracker. TaskTracker was not discussed in original PR #8339 review, so not hot fixing it in here either.

@koivunej koivunej requested a review from a team as a code owner August 7, 2024 13:05
@koivunej koivunej requested a review from VladLazar August 7, 2024 13:05
@conradludgate
Copy link
Contributor

I feel like you could maybe get away with using the lighter weight TaskTracker API which does not need manual draining

@koivunej
Copy link
Member Author

koivunej commented Aug 7, 2024

I feel like you could maybe get away with using the lighter weight TaskTracker API which does not need manual draining

Yep, almost wrote it in as a TODO, but I would rather not do that change because I don't really have time to digest all of #8339 right now.

@koivunej koivunej enabled auto-merge (squash) August 7, 2024 13:24
Copy link

github-actions bot commented Aug 7, 2024

2138 tests run: 2069 passed, 0 failed, 69 skipped (full report)


Flaky tests (1)

Postgres 16

  • test_statvfs_pressure_usage: release

Code coverage* (full report)

  • functions: 32.6% (7156 of 21949 functions)
  • lines: 50.5% (57855 of 114488 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
49bbc22 at 2024-08-07T17:29:18.485Z :recycle:

koivunej and others added 3 commits August 7, 2024 18:41
Co-authored-by: Arpad Müller <arpad-m@users.noreply.github.com>
Co-authored-by: Arpad Müller <arpad-m@users.noreply.github.com>
@koivunej koivunej merged commit 05dd1ae into main Aug 7, 2024
63 checks passed
@koivunej koivunej deleted the joonas/unleak_completed_connection_tasks branch August 7, 2024 17:14
arpad-m pushed a commit that referenced this pull request Aug 7, 2024
We've noticed increased memory usage with the latest release. Drain the
joinset of `page_service` connection handlers to avoid leaking them
until shutdown. An alternative would be to use a TaskTracker.
TaskTracker was not discussed in original PR #8339 review, so not hot
fixing it in here either.
koivunej added a commit that referenced this pull request Aug 12, 2024
It should give us all possible allowed_errors more consistently.

While getting the workflows to pass on
#8632 it was noticed that
allowed_errors are rarely hit (1/4). This made me realize that we always
do an immediate stop by default. Doing a graceful shutdown would had
made the draining more apparent and likely we would not have needed the
#8632 hotfix.

Downside of doing this is that we will see more timeouts if tests are
randomly leaving pause failpoints which fail the shutdown.

The net outcome should however be positive, we could even detect too
slow shutdowns caused by a bug or deadlock.
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