Skip to content

fix(pool): prevent num_idle underflow that wedges maintenance in a CPU spin - #4289

Merged
abonander merged 3 commits into
transact-rs:mainfrom
nipunn1313:nipunn1313/resume-plan
Sep 10, 2026
Merged

abonander merged 3 commits into
transact-rs:mainfrom
nipunn1313:nipunn1313/resume-plan

Conversation

@nipunn1313

@nipunn1313 nipunn1313 commented May 30, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #3645 - A rare 100% CPU and a hang on shutdown.

I made this fix w/ the assistance of an LLM, but I was looking quite carefully to make sure the code changes make sense.

I opted to repro via a stress test - which shows the underflow if you run the test without the fix.

At Convex - we run an hourly job that makes heavy use of sqlx with idle connection configuration. Something like once a week or two, we run into this, where it hangs on shutdown with 100% CPU. I was able to profile traces and narrow down the issue.

Leaving an LLM generated description down below in case you find it helpful.


PoolInner::release made a returned connection acquirable (push to the idle queue + release its semaphore permit) before incrementing num_idle. A concurrent pop_idle (via try_acquire) could pop that connection and run its num_idle.fetch_sub(1) in the window before the increment landed; if num_idle was 0 at that moment the usize wrapped to usize::MAX.

The background maintenance task builds its sweep range from for _ in 0..pool.num_idle(), and once the idle queue drains the loop body is fully synchronous (try_acquire/release never .await). So a single bad read of usize::MAX makes the task spin ~10^19 iterations without yielding, pinning a worker thread forever and never observing the pool close. This is wide open on shutdown, where dropping every PoolConnection spawns a release, racing the maintenance tick. A MultiDbPool (one pool per database) wedges several tasks at once, pegging every worker thread — the reported 100%-CPU-on-shutdown symptom.

Fixes, in sqlx-core/src/pool/inner.rs:

  • release: increment num_idle before publishing the connection. With this order each completed push is preceded by its fetch_add, so #dec <= #pop <= #push <= #inc and num_idle = #inc - #dec >= 0 always. Transient over-counting is harmless (pop_idle finds an empty queue and returns the permit without decrementing). The permit is still released after the push, preserving the woken-waiter-sees-the-connection invariant.
  • pop_idle: saturating decrement, so a stray fetch_sub can never wrap even if a future change reintroduces an ordering bug.

Adds a multi-threaded stress test that drives the real try_acquire and release paths on a small, heavily oversubscribed pool (using the in-crate Any database with a stub backend, so no DB or runtime is needed) and asserts the sampled num_idle never exceeds max_connections. It catches the wrapped usize::MAX reliably on the original code (5/5 debug, 3/3 release runs) and passes with the fix.

nipunn1313 and others added 2 commits May 29, 2026 18:38
…U spin

Fixes transact-rs#3645 - A rare 100% CPU and a hang on shutdown.

I made this fix w/ the assistance of an LLM, but I was looking quite
carefully to make sure the code changes make sense.

I opted to repro via a stress test - which shows the underflow if you
run the test without the fix.

Leaving an LLM generated description down below in case you find it
helpful.

---------------------------------------------------------------------

`PoolInner::release` made a returned connection acquirable (push to the
idle queue + release its semaphore permit) *before* incrementing
`num_idle`. A concurrent `pop_idle` (via `try_acquire`) could pop that
connection and run its `num_idle.fetch_sub(1)` in the window before the
increment landed; if `num_idle` was 0 at that moment the `usize` wrapped
to `usize::MAX`.

The background maintenance task builds its sweep range from
`for _ in 0..pool.num_idle()`, and once the idle queue drains the loop
body is fully synchronous (`try_acquire`/`release` never `.await`). So a
single bad read of `usize::MAX` makes the task spin ~10^19 iterations
without yielding, pinning a worker thread forever and never observing the
pool close. This is wide open on shutdown, where dropping every
`PoolConnection` spawns a `release`, racing the maintenance tick. A
`MultiDbPool` (one pool per database) wedges several tasks at once,
pegging every worker thread — the reported 100%-CPU-on-shutdown symptom.

Fixes, in `sqlx-core/src/pool/inner.rs`:

- release: increment `num_idle` *before* publishing the connection. With
  this order each completed `push` is preceded by its `fetch_add`, so
  `#dec <= #pop <= #push <= #inc` and `num_idle = #inc - #dec >= 0` always.
  Transient over-counting is harmless (`pop_idle` finds an empty queue and
  returns the permit without decrementing). The permit is still released
  after the push, preserving the woken-waiter-sees-the-connection invariant.
- pop_idle: saturating decrement, so a stray `fetch_sub` can never wrap
  even if a future change reintroduces an ordering bug.

Adds a multi-threaded stress test that drives the real `try_acquire` and
`release` paths on a small, heavily oversubscribed pool (using the in-crate
`Any` database with a stub backend, so no DB or runtime is needed) and
asserts the sampled `num_idle` never exceeds `max_connections`. It catches
the wrapped `usize::MAX` reliably on the original code (5/5 debug, 3/3
release runs) and passes with the fix.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
#[derive(Debug)]
struct StubBackend;

impl AnyConnectionBackend for StubBackend {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

would take advice on how to write the test here - this is a bit gnarly, but it worked.

@abonander abonander left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This looks fine, but I would also cap the number of iterations in the maintenance task just to be safe. Either to size or a fixed number.

Address review feedback: bound the maintenance task's idle-connection
sweep at `max_connections` iterations. Even though `num_idle` can no
longer underflow, a corrupt count must never be able to make this
synchronous, non-yielding loop spin unboundedly and starve the runtime.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@nipunn1313
nipunn1313 requested a review from abonander June 9, 2026 19:54
@nipunn1313

Copy link
Copy Markdown
Contributor Author

good idea - just pushed up a small change to do that.

yuhao-su pushed a commit to madsim-rs/sqlx that referenced this pull request Jul 2, 2026
Cherry-pick of transact-rs#4289 onto the madsim v0.8.2 branch.

PoolInner::release() published a returned connection (push to the idle
queue + release its semaphore permit, which wakes waiters) before
incrementing num_idle. A concurrent pop_idle could pop that connection
and decrement num_idle while it was still 0, wrapping the usize to
usize::MAX. The maintenance task's `for _ in 0..num_idle()` sweep then
spins ~forever inside a single non-yielding poll, pegging a worker; on
a single-connection pool one of its add_permits handoffs strands the
permit on a waiter parked in the spinning worker's LIFO slot,
permanently wedging the pool (RisingWave meta silent hang,
risingwavelabs/risingwave#24991; upstream report transact-rs#3645).

Three-layer fix, each independently sufficient:
1. release(): increment num_idle before publishing the connection, so
   the counter provably never goes below 0 (subs <= pops <= pushes <=
   adds) and never exceeds max_connections.
2. pop_idle(): saturating decrement, so even a future ordering bug can
   only over-count, never wrap.
3. maintenance sweep: cap iterations at max_connections.

Includes a 12-thread stress test over the real try_acquire/release
paths (fails in <1s with observed=usize::MAX before the fix).

Co-Authored-By: Claude Fable 5 <[email protected]>
@nipunn1313

Copy link
Copy Markdown
Contributor Author

Hi - wanted to check in on this. Thanks.

@nipunn1313

Copy link
Copy Markdown
Contributor Author

Hi - just wanted to check in here again. Thx.

@abonander
abonander merged commit 5d3787e into transact-rs:main Sep 10, 2026
147 checks passed
@nipunn1313

Copy link
Copy Markdown
Contributor Author

Thanks for the review! Appreciate all the work on sqlx. We've been using it for almost 5 years at Convex.

leseb pushed a commit to leseb/sqlx that referenced this pull request Sep 28, 2026
…U spin (transact-rs#4289)

* fix(pool): prevent num_idle underflow that wedges maintenance in a CPU spin

Fixes transact-rs#3645 - A rare 100% CPU and a hang on shutdown.

I made this fix w/ the assistance of an LLM, but I was looking quite
carefully to make sure the code changes make sense.

I opted to repro via a stress test - which shows the underflow if you
run the test without the fix.

Leaving an LLM generated description down below in case you find it
helpful.

---------------------------------------------------------------------

`PoolInner::release` made a returned connection acquirable (push to the
idle queue + release its semaphore permit) *before* incrementing
`num_idle`. A concurrent `pop_idle` (via `try_acquire`) could pop that
connection and run its `num_idle.fetch_sub(1)` in the window before the
increment landed; if `num_idle` was 0 at that moment the `usize` wrapped
to `usize::MAX`.

The background maintenance task builds its sweep range from
`for _ in 0..pool.num_idle()`, and once the idle queue drains the loop
body is fully synchronous (`try_acquire`/`release` never `.await`). So a
single bad read of `usize::MAX` makes the task spin ~10^19 iterations
without yielding, pinning a worker thread forever and never observing the
pool close. This is wide open on shutdown, where dropping every
`PoolConnection` spawns a `release`, racing the maintenance tick. A
`MultiDbPool` (one pool per database) wedges several tasks at once,
pegging every worker thread — the reported 100%-CPU-on-shutdown symptom.

Fixes, in `sqlx-core/src/pool/inner.rs`:

- release: increment `num_idle` *before* publishing the connection. With
  this order each completed `push` is preceded by its `fetch_add`, so
  `#dec <= #pop <= #push <= #inc` and `num_idle = #inc - #dec >= 0` always.
  Transient over-counting is harmless (`pop_idle` finds an empty queue and
  returns the permit without decrementing). The permit is still released
  after the push, preserving the woken-waiter-sees-the-connection invariant.
- pop_idle: saturating decrement, so a stray `fetch_sub` can never wrap
  even if a future change reintroduces an ordering bug.

Adds a multi-threaded stress test that drives the real `try_acquire` and
`release` paths on a small, heavily oversubscribed pool (using the in-crate
`Any` database with a stub backend, so no DB or runtime is needed) and
asserts the sampled `num_idle` never exceeds `max_connections`. It catches
the wrapped `usize::MAX` reliably on the original code (5/5 debug, 3/3
release runs) and passes with the fix.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* Formatting

* fix(pool): cap maintenance sweep iterations as a safety net

Address review feedback: bound the maintenance task's idle-connection
sweep at `max_connections` iterations. Even though `num_idle` can no
longer underflow, a corrupt count must never be able to make this
synchronous, non-yielding loop spin unboundedly and starve the runtime.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
leseb pushed a commit to leseb/sqlx that referenced this pull request Sep 28, 2026
…U spin (transact-rs#4289)

* fix(pool): prevent num_idle underflow that wedges maintenance in a CPU spin

Fixes transact-rs#3645 - A rare 100% CPU and a hang on shutdown.

I made this fix w/ the assistance of an LLM, but I was looking quite
carefully to make sure the code changes make sense.

I opted to repro via a stress test - which shows the underflow if you
run the test without the fix.

Leaving an LLM generated description down below in case you find it
helpful.

---------------------------------------------------------------------

`PoolInner::release` made a returned connection acquirable (push to the
idle queue + release its semaphore permit) *before* incrementing
`num_idle`. A concurrent `pop_idle` (via `try_acquire`) could pop that
connection and run its `num_idle.fetch_sub(1)` in the window before the
increment landed; if `num_idle` was 0 at that moment the `usize` wrapped
to `usize::MAX`.

The background maintenance task builds its sweep range from
`for _ in 0..pool.num_idle()`, and once the idle queue drains the loop
body is fully synchronous (`try_acquire`/`release` never `.await`). So a
single bad read of `usize::MAX` makes the task spin ~10^19 iterations
without yielding, pinning a worker thread forever and never observing the
pool close. This is wide open on shutdown, where dropping every
`PoolConnection` spawns a `release`, racing the maintenance tick. A
`MultiDbPool` (one pool per database) wedges several tasks at once,
pegging every worker thread — the reported 100%-CPU-on-shutdown symptom.

Fixes, in `sqlx-core/src/pool/inner.rs`:

- release: increment `num_idle` *before* publishing the connection. With
  this order each completed `push` is preceded by its `fetch_add`, so
  `#dec <= #pop <= #push <= #inc` and `num_idle = #inc - #dec >= 0` always.
  Transient over-counting is harmless (`pop_idle` finds an empty queue and
  returns the permit without decrementing). The permit is still released
  after the push, preserving the woken-waiter-sees-the-connection invariant.
- pop_idle: saturating decrement, so a stray `fetch_sub` can never wrap
  even if a future change reintroduces an ordering bug.

Adds a multi-threaded stress test that drives the real `try_acquire` and
`release` paths on a small, heavily oversubscribed pool (using the in-crate
`Any` database with a stub backend, so no DB or runtime is needed) and
asserts the sampled `num_idle` never exceeds `max_connections`. It catches
the wrapped `usize::MAX` reliably on the original code (5/5 debug, 3/3
release runs) and passes with the fix.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* Formatting

* fix(pool): cap maintenance sweep iterations as a safety net

Address review feedback: bound the maintenance task's idle-connection
sweep at `max_connections` iterations. Even though `num_idle` can no
longer underflow, a corrupt count must never be able to make this
synchronous, non-yielding loop spin unboundedly and starve the runtime.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
MOZGIII added a commit to piercefreeman/waymark that referenced this pull request Oct 4, 2026
Updates sqlx to resolve the stalls we've seen on a soak environment.

The cause of the stall has been fixed at
transact-rs/sqlx#4289 but it's not yet released.

---

**Benchmark:** no measurable change.

| | `main` (sqlx 0.8.6) | this PR (sqlx 0.9 + fix) |
|---|---|---|
| Median throughput (instances/s) | 1,721 | 1,759 |
| Median time to complete 25,000 instances | 14.5 s | 14.2 s |
| Fastest / slowest run | 12.4 s / 22.3 s | 12.2 s / 19.0 s |

8 rounds per side, run alternately (`WAYMARK_DB_POOL_SIZE=25
waymark-benchmark --count 5000`, debug build). Per-round differences
ranged from −40% to +54% in both directions, so the ~2% gap is noise.
Both sides issued the same queries in the same volumes.
djh58 added a commit to Qbit-Org/qbit-mining-bootstrap that referenced this pull request Nov 23, 2026
): fixes the coordinator CPU spin

Backports [transact-rs/sqlx#4289](transact-rs/sqlx#4289), "fix(pool): prevent num_idle underflow that wedges maintenance in a CPU spin" (merge commit `5d3787ef9d69947065085f46b58767a50b3d8e25`, merged 2026-09-10, first released in sqlx 0.9.1 on 2026-11-18), into the sqlx-core 0.8.6 that #794 vendored. It is in neither 0.8.6 nor 0.9.0.

## Observed in production

A production PRISM v3.1.1 coordinator stalled repeatedly, for minutes to hours at a time. One tokio worker thread sits at 100% user CPU and never enters a syscall, while every other thread waits. A read-only `perf` sample put 100% of that thread's samples in:

- `sqlx_core::pool::inner::spawn_maintenance_tasks::{closure#1}`
- `ArrayQueue<Idle<Postgres>>::pop`
- `tokio::sync::batch_semaphore::Semaphore::add_permits_locked`

That is the pool's maintenance sweep, `for _ in 0..pool.num_idle()`, running on an empty idle queue with `num_idle` wrapped to about `usize::MAX`.

0.8.6's `release()` pushes a connection onto the idle queue and releases its permit before it adds one to `num_idle`, while `pop_idle()` pops and then subtracts one. An acquire that lands between the two subtracts first, and with the count at 0 it wraps until the add lands. The maintenance task reads the count once as its loop bound. With the queue empty the loop body never awaits, so a task that read the wrapped count keeps its worker for good.

The stalls recur on a 30-minute rhythm, because every connection reopens together after each stall and they all reach the 30-minute `max_lifetime` together.

## The change

`vendor/sqlx-core/src/pool/inner.rs` takes upstream's diff:

- `release()` adds to `num_idle` before it pushes the connection;
- `pop_idle()` subtracts saturating at 0;
- the maintenance sweep makes at most `min(num_idle(), max_connections)` checks.

Those three code changes are upstream's, line for line (the added and removed lines of the hunks diff empty against upstream's commit). Nothing else in the vendored crate's code changes.

Upstream's stress test, `underflow_tests`, comes with them. It needed two adaptations to build and run on 0.8.6, both recorded in `vendor/sqlx-core/README.md`:

- its stub backend takes 0.8.6's `AnyConnectionBackend` signatures (`&str` and `Cow<'static, str>` where 0.9 has `SqlStr`, and `describe` without the `offline` gate);
- its pool sets neither `max_lifetime` nor `idle_timeout`, so that it spawns no maintenance task and needs no runtime.

`vendor/sqlx-core/README.md` gains the #4289 entry in the style of #4251's and #3861's.

## Test evidence

Upstream's test, run from a copy of the vendored crate with `cargo test --lib --features any,_rt-tokio underflow` (12 threads, 200,000 acquire and release cycles each, on a pool of 3):

| Pool code | Debug | Release |
| --- | --- | --- |
| 0.8.6 as vendored before this change | 5 of 5 fail: `saw 18446744073709551615, max 3` | 3 of 3 fail, same message |
| with this change | 5 of 5 pass | 3 of 3 pass |

Also run locally:

- `cargo check --lib --features _rt-tokio,_tls-rustls-ring-webpki,json,chrono,migrate` on the patched crate: clean, with only the three warnings upstream ships;
- `python3 scripts/check_vendored_sqlx_core.py`: both lock files use `vendor/sqlx-core` 0.8.6, 0 advisories;
- `python3 -m unittest tests.test_check_vendored_sqlx_core`: 11 tests pass.

Not run locally: the workspace build and test suites. The host had 1.6 GB of disk free, so CI is the first full build of this.

## What this does not cover

- **CI does not run upstream's test.** It is a unit test inside sqlx-core, and Cargo tests only workspace members. The README says how to run it. Nothing in CI fails if these hunks are lost; a regression test through the public pool API in `crates/qbit-prism-server/tests/`, as #4251 and #3861 have, would close that.
- **The sweep cap has no test of its own**, upstream's included: with the reordering in place the count cannot wrap, so the cap is never reached.
- **No version bump, tag or release.** `VERSION` stays 3.1.1.
- **Release notes.** The pending 3.1.2 notes in #897 need an entry for this fix; this PR adds none, as `main` has no unreleased notes file.
- **3.x.x.** The fix reaches 3.x.x by merging `main` into it after this lands. There, #836's source check requires the change recorded as a patch in `vendor/sqlx-core.patches/`, and the README has diverged, so that merge needs both resolved.

Refs #794.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Squashed commits:
192603d main: backport sqlx's pool num_idle underflow fix (transact-rs/sqlx#4289): fixes the coordinator CPU spin
6db3769 vendor/sqlx-core/README.md: say what the #4289 backport is for without deployment details

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Squashed-from: 6db3769
djh58 added a commit to Qbit-Org/qbit-mining-bootstrap that referenced this pull request Nov 23, 2026
): fixes the coordinator CPU spin (#917)

Backports [transact-rs/sqlx#4289](transact-rs/sqlx#4289), "fix(pool): prevent num_idle underflow that wedges maintenance in a CPU spin" (merge commit `5d3787ef9d69947065085f46b58767a50b3d8e25`, merged 2026-09-10, first released in sqlx 0.9.1 on 2026-11-18), into the sqlx-core 0.8.6 that #794 vendored. It is in neither 0.8.6 nor 0.9.0.

## Observed in production

A production PRISM v3.1.1 coordinator stalled repeatedly, for minutes to hours at a time. One tokio worker thread sits at 100% user CPU and never enters a syscall, while every other thread waits. A read-only `perf` sample put 100% of that thread's samples in:

- `sqlx_core::pool::inner::spawn_maintenance_tasks::{closure#1}`
- `ArrayQueue<Idle<Postgres>>::pop`
- `tokio::sync::batch_semaphore::Semaphore::add_permits_locked`

That is the pool's maintenance sweep, `for _ in 0..pool.num_idle()`, running on an empty idle queue with `num_idle` wrapped to about `usize::MAX`.

0.8.6's `release()` pushes a connection onto the idle queue and releases its permit before it adds one to `num_idle`, while `pop_idle()` pops and then subtracts one. An acquire that lands between the two subtracts first, and with the count at 0 it wraps until the add lands. The maintenance task reads the count once as its loop bound. With the queue empty the loop body never awaits, so a task that read the wrapped count keeps its worker for good.

The stalls recur on a 30-minute rhythm, because every connection reopens together after each stall and they all reach the 30-minute `max_lifetime` together.

## The change

`vendor/sqlx-core/src/pool/inner.rs` takes upstream's diff:

- `release()` adds to `num_idle` before it pushes the connection;
- `pop_idle()` subtracts saturating at 0;
- the maintenance sweep makes at most `min(num_idle(), max_connections)` checks.

Those three code changes are upstream's, line for line (the added and removed lines of the hunks diff empty against upstream's commit). Nothing else in the vendored crate's code changes.

Upstream's stress test, `underflow_tests`, comes with them. It needed two adaptations to build and run on 0.8.6, both recorded in `vendor/sqlx-core/README.md`:

- its stub backend takes 0.8.6's `AnyConnectionBackend` signatures (`&str` and `Cow<'static, str>` where 0.9 has `SqlStr`, and `describe` without the `offline` gate);
- its pool sets neither `max_lifetime` nor `idle_timeout`, so that it spawns no maintenance task and needs no runtime.

`vendor/sqlx-core/README.md` gains the #4289 entry in the style of #4251's and #3861's.

## Test evidence

Upstream's test, run from a copy of the vendored crate with `cargo test --lib --features any,_rt-tokio underflow` (12 threads, 200,000 acquire and release cycles each, on a pool of 3):

| Pool code | Debug | Release |
| --- | --- | --- |
| 0.8.6 as vendored before this change | 5 of 5 fail: `saw 18446744073709551615, max 3` | 3 of 3 fail, same message |
| with this change | 5 of 5 pass | 3 of 3 pass |

Also run locally:

- `cargo check --lib --features _rt-tokio,_tls-rustls-ring-webpki,json,chrono,migrate` on the patched crate: clean, with only the three warnings upstream ships;
- `python3 scripts/check_vendored_sqlx_core.py`: both lock files use `vendor/sqlx-core` 0.8.6, 0 advisories;
- `python3 -m unittest tests.test_check_vendored_sqlx_core`: 11 tests pass.

Not run locally: the workspace build and test suites. The host had 1.6 GB of disk free, so CI is the first full build of this.

## What this does not cover

- **CI does not run upstream's test.** It is a unit test inside sqlx-core, and Cargo tests only workspace members. The README says how to run it. Nothing in CI fails if these hunks are lost; a regression test through the public pool API in `crates/qbit-prism-server/tests/`, as #4251 and #3861 have, would close that.
- **The sweep cap has no test of its own**, upstream's included: with the reordering in place the count cannot wrap, so the cap is never reached.
- **No version bump, tag or release.** `VERSION` stays 3.1.1.
- **Release notes.** The pending 3.1.2 notes in #897 need an entry for this fix; this PR adds none, as `main` has no unreleased notes file.
- **3.x.x.** The fix reaches 3.x.x by merging `main` into it after this lands. There, #836's source check requires the change recorded as a patch in `vendor/sqlx-core.patches/`, and the README has diverged, so that merge needs both resolved.

Refs #794.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Squashed commits:
192603d main: backport sqlx's pool num_idle underflow fix (transact-rs/sqlx#4289): fixes the coordinator CPU spin
6db3769 vendor/sqlx-core/README.md: say what the #4289 backport is for without deployment details


Squashed-from: 6db3769

Co-authored-by: Claude Fable 5.2 <[email protected]>
djh58 added a commit to Qbit-Org/qbit-mining-bootstrap that referenced this pull request Nov 23, 2026
…qlx#4289), squash-merge landing and the release-tags ruleset

Merges main at 8c561dc into 3.x.x at ec677fb.

From main, unchanged: the transact-rs/sqlx#4289 backport in
vendor/sqlx-core/src/pool/inner.rs (#917), and the landing and ruleset
changes of #877 and #879 (.github/repository-settings.json,
.github/rulesets/, .github/workflows/signed-landing.yml, docs/releasing.md).

One conflict, vendor/sqlx-core/README.md: both branches changed the
paragraph on how the diffs apply and the line that introduces the CI
check. The merge keeps 3.x.x's text on the recorded patches and main's on
#4289.

Three edits that are not from main, which 3.x.x's source check needs:

- vendor/sqlx-core.patches/0004-sqlx-4289-pool-num-idle-cannot-underflow.patch
  records the change, as scripts/check_vendored_sqlx_core.py
  --unrecorded-diff printed it;
- vendor/sqlx-core/README.md names that patch, and says that CI runs no
  test of #4289's change;
- tests/test_check_vendored_sqlx_core.py expects 4 patches and 5 patched
  files.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
djh58 added a commit to Qbit-Org/qbit-mining-bootstrap that referenced this pull request Nov 23, 2026
Merge main into 3.x.x: the sqlx-core pool num_idle fix (transact-rs/sqlx#4289), squash-merge landing and the release-tags ruleset
djh58 added a commit to Qbit-Org/qbit-mining-bootstrap that referenced this pull request Nov 23, 2026
…918 has landed the fix

3.x.x at 8eff40a has the transact-rs/sqlx#4289 backport, so the two new
tests pass from here on.

Git merges vendor/sqlx-core/README.md without a conflict, but its result
keeps a sentence #918 added, that CI runs no test of #4289's change,
which this branch makes untrue. The merge takes git's text with that
paragraph on the source check saying again that the regression tests
check what every change does, and with the paragraph on upstream's own
test reworded to follow the new test's sentence.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
djh58 added a commit to Qbit-Org/qbit-mining-bootstrap that referenced this pull request Nov 23, 2026
…ransact-rs/sqlx#4289)

Replaces #919, which was opened against `main`: the test goes to `3.x.x` and reaches `main` with the 3.1.2 promotion.

**This merges after #918, and its new test fails until then.** `3.x.x` does not have the fix yet. #918 brings it, as the merge of `main` (#917). Until #918 lands, "Rust tests" is red here on the two new tests, which is what they are for. Once #918 is in, this branch takes `3.x.x` again and CI is re-run.

## Why

#917 backported [transact-rs/sqlx#4289](transact-rs/sqlx#4289) into the vendored sqlx-core 0.8.6. Its only test is upstream's unit test inside sqlx-core, which CI does not run, so nothing in CI fails if the fix is lost. This adds a regression test that CI runs, next to the ones #4251 and #3861 have.

## The test

`crates/qbit-prism-server/tests/sqlx_pool_num_idle.rs` goes through sqlx's public Postgres pool, the type the server uses, against a local socket that answers only what a pool asks: any startup, and ReadyForQuery for each Sync, which is sqlx's ping. It needs no database and adds no dependency.

It opens the bug's window without a race. The pool's semaphore calls a waiting `acquire()`'s waker from inside `release()`, as it hands over the permit: after the connection is pushed and, in 0.8.6, before `num_idle` is incremented. The tests poll a pending `acquire()` by hand with their own waker, and that waker polls it again where it is called. The waiter then takes the connection at the very point where another worker's acquire could.

- **`a_connection_taken_inside_release_leaves_the_idle_count_at_zero`** reads the pool's idle count at that point. It also checks that the server accepted one connection, so the waiter took the released connection and did not open another.
- **`maintenance_still_reaps_after_a_sweep_during_a_handoff`** holds that window open for three maintenance periods, then leaves a connection idle and expects the maintenance task to close it. The connection is released on a second runtime, so that the hold blocks that runtime's worker and the pool's own runtime keeps its timers.

`vendor/sqlx-core/README.md` names the test file, in the paragraph that lists each change's regression tests.

## Evidence

Run in a scratch crate with this file, sqlx at the repository's features and lock file, and `[patch.crates-io]` pointing at each copy of sqlx-core:

| sqlx-core pool code | idle count inside `release()` | maintenance after the sweep | result |
| --- | --- | --- | --- |
| 0.8.6 as vendored on `3.x.x` today | `18446744073709551615` | the sweep reads `usize::MAX` and never sweeps again; the connection is never closed | both tests fail |
| 0.8.6 ordering, with only #4289's sweep cap | `18446744073709551615` | sweeps on and closes the connection | first fails, second passes |
| with #917's fix | `0` | sweeps on and closes the connection | both pass, 10 runs of 10, 0.8 to 1.0 s |

The second row is the only place the sweep cap is exercised: with the reordering in place the count cannot wrap, so the cap is never reached.

On the unpatched code, a trace of the sweep showed it start with `num_idle=18446744073709551615` and print nothing after. Nothing else on that runtime ran again either: the worker that had been driving its timers and sockets was the one spinning.

Also run: `rustfmt --check` on the file, and `cargo clippy --tests -- -D warnings` in the scratch crate, both clean. On this branch, `python3 scripts/check_vendored_sqlx_core.py --upstream-crate …` passes (upstream 0.8.6 plus the 3 recorded patches, byte for byte) and `tests.test_check_vendored_sqlx_core` passes.

## What this does not cover

- **Not built in this workspace locally.** The host was short of disk, so CI is the first build of the file inside `qbit-prism-server`.
- **When it fails, the second test takes 30 s**, the bound on its wait. A sweep that never ends also keeps one thread of the test binary busy until the binary exits. Both apply to this pull request's CI until #918 lands.
- **The second test's failure depends on timing.** It needs the maintenance task to sweep during a 600 ms hold, at a 200 ms period. A runner stalled for that whole hold would let unfixed code pass it. With the fix it passes whatever the timing, and the first test has no such dependence.
- **The README will conflict with #918's.** Both add text after the same sentence. When this branch takes `3.x.x` after #918, the README's paragraph on the source check also goes back to saying that the regression tests cover every change.

Refs #917, #918, #794.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Squashed commits:
4155c9d 3.x.x: a regression test CI runs for the sqlx-core pool num_idle fix (transact-rs/sqlx#4289)
a01a68c Merge 3.x.x into the pool num_idle regression test's branch, now that #918 has landed the fix

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Squashed-from: a01a68c
djh58 added a commit to Qbit-Org/qbit-mining-bootstrap that referenced this pull request Nov 23, 2026
…ransact-rs/sqlx#4289)

Replaces #919, which was opened against `main`: the test goes to `3.x.x` and reaches `main` with the 3.1.2 promotion.

**This merges after #918, and its new test fails until then.** `3.x.x` does not have the fix yet. #918 brings it, as the merge of `main` (#917). Until #918 lands, "Rust tests" is red here on the two new tests, which is what they are for. Once #918 is in, this branch takes `3.x.x` again and CI is re-run.

## Why

#917 backported [transact-rs/sqlx#4289](transact-rs/sqlx#4289) into the vendored sqlx-core 0.8.6. Its only test is upstream's unit test inside sqlx-core, which CI does not run, so nothing in CI fails if the fix is lost. This adds a regression test that CI runs, next to the ones #4251 and #3861 have.

## The test

`crates/qbit-prism-server/tests/sqlx_pool_num_idle.rs` goes through sqlx's public Postgres pool, the type the server uses, against a local socket that answers only what a pool asks: any startup, and ReadyForQuery for each Sync, which is sqlx's ping. It needs no database and adds no dependency.

It opens the bug's window without a race. The pool's semaphore calls a waiting `acquire()`'s waker from inside `release()`, as it hands over the permit: after the connection is pushed and, in 0.8.6, before `num_idle` is incremented. The tests poll a pending `acquire()` by hand with their own waker, and that waker polls it again where it is called. The waiter then takes the connection at the very point where another worker's acquire could.

- **`a_connection_taken_inside_release_leaves_the_idle_count_at_zero`** reads the pool's idle count at that point. It also checks that the server accepted one connection, so the waiter took the released connection and did not open another.
- **`maintenance_still_reaps_after_a_sweep_during_a_handoff`** holds that window open for three maintenance periods, then leaves a connection idle and expects the maintenance task to close it. The connection is released on a second runtime, so that the hold blocks that runtime's worker and the pool's own runtime keeps its timers.

`vendor/sqlx-core/README.md` names the test file, in the paragraph that lists each change's regression tests.

## Evidence

Run in a scratch crate with this file, sqlx at the repository's features and lock file, and `[patch.crates-io]` pointing at each copy of sqlx-core:

| sqlx-core pool code | idle count inside `release()` | maintenance after the sweep | result |
| --- | --- | --- | --- |
| 0.8.6 as vendored on `3.x.x` today | `18446744073709551615` | the sweep reads `usize::MAX` and never sweeps again; the connection is never closed | both tests fail |
| 0.8.6 ordering, with only #4289's sweep cap | `18446744073709551615` | sweeps on and closes the connection | first fails, second passes |
| with #917's fix | `0` | sweeps on and closes the connection | both pass, 10 runs of 10, 0.8 to 1.0 s |

The second row is the only place the sweep cap is exercised: with the reordering in place the count cannot wrap, so the cap is never reached.

On the unpatched code, a trace of the sweep showed it start with `num_idle=18446744073709551615` and print nothing after. Nothing else on that runtime ran again either: the worker that had been driving its timers and sockets was the one spinning.

Also run: `rustfmt --check` on the file, and `cargo clippy --tests -- -D warnings` in the scratch crate, both clean. On this branch, `python3 scripts/check_vendored_sqlx_core.py --upstream-crate …` passes (upstream 0.8.6 plus the 3 recorded patches, byte for byte) and `tests.test_check_vendored_sqlx_core` passes.

## What this does not cover

- **Not built in this workspace locally.** The host was short of disk, so CI is the first build of the file inside `qbit-prism-server`.
- **When it fails, the second test takes 30 s**, the bound on its wait. A sweep that never ends also keeps one thread of the test binary busy until the binary exits. Both apply to this pull request's CI until #918 lands.
- **The second test's failure depends on timing.** It needs the maintenance task to sweep during a 600 ms hold, at a 200 ms period. A runner stalled for that whole hold would let unfixed code pass it. With the fix it passes whatever the timing, and the first test has no such dependence.
- **The README will conflict with #918's.** Both add text after the same sentence. When this branch takes `3.x.x` after #918, the README's paragraph on the source check also goes back to saying that the regression tests cover every change.

Refs #917, #918, #794.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Squashed commits:
4155c9d 3.x.x: a regression test CI runs for the sqlx-core pool num_idle fix (transact-rs/sqlx#4289)
a01a68c Merge 3.x.x into the pool num_idle regression test's branch, now that #918 has landed the fix

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Squashed-from: a01a68c
Signed-commit: 6f88fe8
markharding pushed a commit to futo-org/Harbor that referenced this pull request Nov 24, 2026
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [sqlx](https://github.com/launchbadge/sqlx) | dependencies | patch | `0.9.0` → `0.9.1` |

---

> ⚠️ **Warning**
>
> Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/2097) for more information.

---

### Release Notes

<details>
<summary>launchbadge/sqlx (sqlx)</summary>

### [`v0.9.1`](https://github.com/launchbadge/sqlx/blob/HEAD/CHANGELOG.md#091---2026-11-17)

[Compare Source](transact-rs/sqlx@v0.9.0...v0.9.1)

##### AI Policy Announcement

Prompted by  a recent uptick in AI-generated pull requests, we added an [`AI_POLICY.md`](./AI_POLICY.md) to clarify our position
on AI-generated contributions. This is not strictly a new policy, but a codification of existing sentiment among the
maintainers and community.

TL;DR: the use of generative AI is **not** expressly prohibited, but there's a few big things that will not be accepted
(note that this list is not exhaustive):

- Issues and pull requests authored primarily or entirely by agents like Claude Code.
- Comments and interactions that are clearly AI generated.
- Commits authored by or attributed to Claude or other agents.
- PRs that duplicate the effort of other existing pull requests without acknowledging them.

See also [#&#8203;4472] for motivation and discussion.

##### Added

- \[[#&#8203;4080]]: feat(sqlite): expose thread_stack_size option \[\[[@&#8203;ZenasSong](https://github.com/ZenasSong)]]
- \[[#&#8203;4130]]: mysql: add TLS server name override for SNI \[\[[@&#8203;mingley](https://github.com/mingley)]]
- \[[#&#8203;4295]]: Add Infinity check functions to `PgInterval` \[\[[@&#8203;firebladed](https://github.com/firebladed)]]
- \[[#&#8203;4334]]: feat: add ability to set or unset the CLIENT_FOUND_ROWS flag \[\[[@&#8203;andreastedile](https://github.com/andreastedile)]]
- \[[#&#8203;4475]]: feat(tls): support native roots with the rustls AWS-LC backend \[\[[@&#8203;markuskobler](https://github.com/markuskobler)]]
  - Adds `tls-rustls-aws-lc-rs-native-roots` feature.
- \[[#&#8203;4478]]: feat: add Type for MySQL, Sqlite, and Any byte arrays \[\[[@&#8203;daimond113](https://github.com/daimond113)]]

##### Changed

- \[[#&#8203;4242]]: Reuse the TLS connector across connection attempts \[\[[@&#8203;goffrie](https://github.com/goffrie)]]
- \[[#&#8203;4263]]: sqlx-cli: drop the literal style override that was invisible on light terminals \[\[[@&#8203;c-tonneslan](https://github.com/c-tonneslan)]]
- \[[#&#8203;4264]]: chore: Add README to examples \[\[[@&#8203;szabgab](https://github.com/szabgab)]]
- \[[#&#8203;4278]]: docs: document sqlx test connection limits \[\[[@&#8203;angelnereira](https://github.com/angelnereira)]]
- \[[#&#8203;4344]]: docs(postgres): document default TimeZone=UTC session behavior \[\[[@&#8203;jeremie0342](https://github.com/jeremie0342)]]
- \[[#&#8203;4345]]: docs(macros): document that bind parameter nullability is not compile-checked \[\[[@&#8203;jeremie0342](https://github.com/jeremie0342)]]
- \[[#&#8203;4367]]: Error on .sql migration files that don't match the expected filename format \[\[[@&#8203;teddytennant](https://github.com/teddytennant)]]
- \[[#&#8203;4377]]: Update README.md versions to 0.9 \[\[[@&#8203;Voklen](https://github.com/Voklen)]]
- \[[#&#8203;4388]]: Replace license symlinks with copies \[\[[@&#8203;WaterWhisperer](https://github.com/WaterWhisperer)]]
- \[[#&#8203;4392]]: Improve sqlx prepare invocation error \[\[[@&#8203;mameikagou](https://github.com/mameikagou)]]
- \[[#&#8203;4398]]: docs: clarify `Pool::size` and `Pool::num_idle` \[\[[@&#8203;valentynkit](https://github.com/valentynkit)]]
- \[[#&#8203;4402]]: sqlx-sqlite: relax libsqlite3-sys constraint to allow 0.38.x \[\[[@&#8203;dtolnay](https://github.com/dtolnay)]]
- \[[#&#8203;4472]]: doc: add `AI_POLICY.md` \[\[[@&#8203;abonander](https://github.com/abonander)]]
- \[[#&#8203;4502]]: Bump the upper bound on libsqlite3-sys to allow 0.39.x \[\[[@&#8203;joshtriplett](https://github.com/joshtriplett)]]
- \[[#&#8203;4514]]: fix(postgres): make `hostaddr` semantics match `libpq` \[\[[@&#8203;abonander](https://github.com/abonander)]]
  - Minor breaking behavior change: `hostaddr`(env: `PGHOSTADDR`) is no longer treated as a simple alias for `host`.
  - It bypasses DNS resolution but `host` is still used for TLS Server Name Identification (SNI), if applicable.
  - This is considered a bugfix because this now matches `libpq`'s behavior as promised in the docs.

##### Fixed

- \[[#&#8203;4016]]: Fix PgListener::try_recv \[\[[@&#8203;PonasKovas](https://github.com/PonasKovas)]]
- \[[#&#8203;4205]]: bugfix: streamline and fix AnyQueryResult::last_insert_id() for SQLite \[\[[@&#8203;migus-rs](https://github.com/migus-rs)]]
- \[[#&#8203;4282]]: fix(macros): don't look for `.env` outside workspace \[\[[@&#8203;abonander](https://github.com/abonander)]]
- \[[#&#8203;4286]]: Fix query macros against CockroachDB by gating plan_cache_mode on EXPLAIN support \[\[[@&#8203;BastienClement](https://github.com/BastienClement)]]
- \[[#&#8203;4289]]: fix(pool): prevent num_idle underflow that wedges maintenance in a CPU spin \[\[[@&#8203;nipunn1313](https://github.com/nipunn1313)]]
- \[[#&#8203;4301]]: fix(deps): align sqlx-core and sqlx-macros-core on workspace sha2 \[\[[@&#8203;waamm](https://github.com/waamm)]]
- \[[#&#8203;4303]]: fix: whoami regression to anonymous user \[\[[@&#8203;lsunsi](https://github.com/lsunsi)]]
- \[[#&#8203;4306]]: fix(sqlite): return 0 for changes if statement is read-only \[\[[@&#8203;waamm](https://github.com/waamm)]]
- \[[#&#8203;4317]]: fix(sqlite): migrate datetime format builders off time 0.3.48-depreca… \[\[[@&#8203;LiamCarPer](https://github.com/LiamCarPer)]]
- \[[#&#8203;4336]]: perf: enable TCP_NODELAY on sockets \[\[[@&#8203;dmitryvk](https://github.com/dmitryvk)]]
- \[[#&#8203;4337]]: Fix PostgreSQL memory leak when statement cache is disabled \[\[[@&#8203;deathlesz](https://github.com/deathlesz)]]
- \[[#&#8203;4340]]: fix(sqlite): correct sub-second decoding of pre-epoch REAL datetimes \[\[[@&#8203;zelinewang](https://github.com/zelinewang)]]
- \[[#&#8203;4359]]: Fix Any type/close handling, MySQL time signs, SQLite plans, and macro docs \[\[[@&#8203;WaterWhisperer](https://github.com/WaterWhisperer)]]
- \[[#&#8203;4361]]: fix(postgres): re-parse unnamed statement after resolving custom-type OIDs \[\[[@&#8203;DoTuanAnh2k1](https://github.com/DoTuanAnh2k1)]]
- \[[#&#8203;4371]]: fix(macros): tolerate unreadable dotenv with query source \[\[[@&#8203;Boulea7](https://github.com/Boulea7)]]
- \[[#&#8203;4374]]: fix(sqlite): don't dereference a NULL declared type in column_nullable \[\[[@&#8203;msdrigg](https://github.com/msdrigg)]]
- \[[#&#8203;4375]]: \[PostgreSQL] Invalided stale prepared statements \[\[[@&#8203;Flassie](https://github.com/Flassie)]]
- \[[#&#8203;4394]]: fix(postgres): roll back a transaction cancelled during BEGIN \[\[[@&#8203;rubenfiszel](https://github.com/rubenfiszel)]]
- \[[#&#8203;4406]]: fix(postgres): return UnexpectedEof when server closes connection at SSLRequest \[\[[@&#8203;zfaustk](https://github.com/zfaustk)]]
- \[[#&#8203;4413]]: Fix incorrect example path and migration filename in docs \[\[[@&#8203;toyeshhm](https://github.com/toyeshhm)]]
- \[[#&#8203;4433]]: fix(sqlite): return an error instead of panicking when decoding an out-of-range INTEGER as PrimitiveDateTime \[\[[@&#8203;breken-ai](https://github.com/breken-ai)]]
- \[[#&#8203;4436]]: fix(mysql): use the AuthSwitchRequest nonce for caching_sha2_password full auth \[\[[@&#8203;LeandroDettmer](https://github.com/LeandroDettmer)]]
- \[[#&#8203;4439]]: fix(macros-core): only track paths rustc can checksum \[\[[@&#8203;varunshahdev](https://github.com/varunshahdev)]]
- \[[#&#8203;4441]]: fix(mysql): decode MySQL 9 VECTOR columns (type 0xf2) \[\[[@&#8203;anderson-andres-dev](https://github.com/anderson-andres-dev)]]
- \[[#&#8203;4442]]: fix(sqlite): await SQLCipher test connection cleanup before exit \[\[[@&#8203;shuvroroy](https://github.com/shuvroroy)]]
- \[[#&#8203;4450]]: fix(tls): don't wait for incoming data in `RustlsSocket::poll_flush()` \[\[[@&#8203;Tango-Ninja](https://github.com/Tango-Ninja)]]
- \[[#&#8203;4458]]: fix(mysql): harden protocol decoders against malformed packets from hostile servers \[\[[@&#8203;portlandhodl](https://github.com/portlandhodl)]]
- \[[#&#8203;4463]]: fix(macros): only report Ambiguous{DateTime,Numeric}Type when preferred crate is Inferred \[\[[@&#8203;rscorer](https://github.com/rscorer)]]
- \[[#&#8203;4473]]: fix(sqlite): synchronize transaction depth when SQLite auto-rolls back \[\[[@&#8203;webdevsamran](https://github.com/webdevsamran)]]
- \[[#&#8203;4477]]: fix(postgres): Bind encodes result-format count from the wrong field \[\[[@&#8203;prostomarkeloff](https://github.com/prostomarkeloff)]]
- \[[#&#8203;4485]]: fix(postgres): ignore notifications on connections that aren't listening.  fixes [#&#8203;4484](transact-rs/sqlx#4484). \[\[[@&#8203;luketpeterson](https://github.com/luketpeterson)]]
- \[[#&#8203;4488]]: fix(postgres): preserve quoted "NULL" elements when decoding text arrays \[\[[@&#8203;MinJaeRun](https://github.com/MinJaeRun)]]
- \[[#&#8203;4493]]: fix(mysql): handle empty passwords during authentication switches. \[\[[@&#8203;lmont19](https://github.com/lmont19)]]
- \[[#&#8203;4496]]: fix(mysql): quote charset/collation/time_zone in connect-time SET \[\[[@&#8203;Nacl-HCl](https://github.com/Nacl-HCl)]]
- \[[#&#8203;4498]]: fix(postgres): keep draining resolved type dependencies in fill_cache \[\[[@&#8203;ducnhan123-co](https://github.com/ducnhan123-co)]]
- \[[#&#8203;4503]]: fix(mysql): decode DECIMAL columns into integer types correctly \[\[[@&#8203;Map130](https://github.com/Map130)]]
- \[[#&#8203;4508]]: fix(macros): reject `#[repr(C)]` on enums in `derive(Type)` \[\[[@&#8203;thelastbackspace](https://github.com/thelastbackspace)]]
- \[[#&#8203;4525]]: sqlx-sqlite: bump the upper bound on libsqlite3-sys to allow 0.40.x \[\[[@&#8203;lthiery](https://github.com/lthiery)]]
- \[[#&#8203;4526]]: docs(FAQ): Replace versioned docs.rs link with latest \[\[[@&#8203;TheJanzap](https://github.com/TheJanzap)]]
- \[[#&#8203;4528]]: fix(postgres): don't panic decoding out-of-range dates and times \[\[[@&#8203;colinhacks](https://github.com/colinhacks)]]
- \[[#&#8203;4529]]: fix: handle IPv6 properly at all levels \[\[[@&#8203;abonander](https://github.com/abonander)]]
  - IPv6 addresses are now properly supported in URLs (e.g. `postgres://user:password@[::1]:5432/database`)
    and passed to the TLS layer for IP-based Server Name Identification (SNI), if applicable.
  - Note: renamed unreleased `MySqlConnectOptions::tls_servername()` to `tls_sni_servername`
    to match the option added to the MySQL C API. Also added `tls-sni-servername` as a URL parameter.

[#&#8203;4016]: transact-rs/sqlx#4016

[#&#8203;4080]: transact-rs/sqlx#4080

[#&#8203;4130]: transact-rs/sqlx#4130

[#&#8203;4205]: transact-rs/sqlx#4205

[#&#8203;4242]: transact-rs/sqlx#4242

[#&#8203;4263]: transact-rs/sqlx#4263

[#&#8203;4264]: transact-rs/sqlx#4264

[#&#8203;4278]: transact-rs/sqlx#4278

[#&#8203;4282]: transact-rs/sqlx#4282

[#&#8203;4286]: transact-rs/sqlx#4286

[#&#8203;4289]: transact-rs/sqlx#4289

[#&#8203;4295]: transact-rs/sqlx#4295

[#&#8203;4301]: transact-rs/sqlx#4301

[#&#8203;4303]: transact-rs/sqlx#4303

[#&#8203;4306]: transact-rs/sqlx#4306

[#&#8203;4317]: transact-rs/sqlx#4317

[#&#8203;4334]: transact-rs/sqlx#4334

[#&#8203;4336]: transact-rs/sqlx#4336

[#&#8203;4337]: transact-rs/sqlx#4337

[#&#8203;4340]: transact-rs/sqlx#4340

[#&#8203;4344]: transact-rs/sqlx#4344

[#&#8203;4345]: transact-rs/sqlx#4345

[#&#8203;4359]: transact-rs/sqlx#4359

[#&#8203;4361]: transact-rs/sqlx#4361

[#&#8203;4367]: transact-rs/sqlx#4367

[#&#8203;4371]: transact-rs/sqlx#4371

[#&#8203;4374]: transact-rs/sqlx#4374

[#&#8203;4375]: transact-rs/sqlx#4375

[#&#8203;4377]: transact-rs/sqlx#4377

[#&#8203;4388]: transact-rs/sqlx#4388

[#&#8203;4392]: transact-rs/sqlx#4392

[#&#8203;4394]: transact-rs/sqlx#4394

[#&#8203;4398]: transact-rs/sqlx#4398

[#&#8203;4402]: transact-rs/sqlx#4402

[#&#8203;4406]: transact-rs/sqlx#4406

[#&#8203;4413]: transact-rs/sqlx#4413

[#&#8203;4433]: transact-rs/sqlx#4433

[#&#8203;4436]: transact-rs/sqlx#4436

[#&#8203;4439]: transact-rs/sqlx#4439

[#&#8203;4441]: transact-rs/sqlx#4441

[#&#8203;4442]: transact-rs/sqlx#4442

[#&#8203;4450]: transact-rs/sqlx#4450

[#&#8203;4473]: transact-rs/sqlx#4473

[#&#8203;4458]: transact-rs/sqlx#4458

[#&#8203;4463]: transact-rs/sqlx#4463

[#&#8203;4472]: transact-rs/sqlx#4472

[#&#8203;4475]: transact-rs/sqlx#4475

[#&#8203;4477]: transact-rs/sqlx#4477

[#&#8203;4478]: transact-rs/sqlx#4478

[#&#8203;4485]: transact-rs/sqlx#4485

[#&#8203;4488]: transact-rs/sqlx#4488

[#&#8203;4493]: transact-rs/sqlx#4493

[#&#8203;4496]: transact-rs/sqlx#4496

[#&#8203;4498]: transact-rs/sqlx#4498

[#&#8203;4502]: transact-rs/sqlx#4502

[#&#8203;4503]: transact-rs/sqlx#4503

[#&#8203;4508]: transact-rs/sqlx#4508

[#&#8203;4514]: transact-rs/sqlx#4514

[#&#8203;4525]: transact-rs/sqlx#4525

[#&#8203;4526]: transact-rs/sqlx#4526

[#&#8203;4528]: transact-rs/sqlx#4528

[#&#8203;4529]: transact-rs/sqlx#4529

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 9am on tuesday"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yNTIuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjI1Mi4wIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZSJdfQ==-->

Co-authored-by: Thomas de Zeeuw <[email protected]>
Reviewed-on: https://code.futo.org/harbor/harbor/pulls/2477
Reviewed-by: Thomas de Zeeuw <[email protected]>
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.

100% CPU in sqlx_core::pool::inner::spawn_maintenance_tasks

2 participants