Skip to content

Fix max_lifetime docstring inaccuracies, validation, and typos#345

Merged
josevalim merged 1 commit intoelixir-ecto:masterfrom
ericmj:claude/pull-upstream-main-kkiUe
Apr 25, 2026
Merged

Fix max_lifetime docstring inaccuracies, validation, and typos#345
josevalim merged 1 commit intoelixir-ecto:masterfrom
ericmj:claude/pull-upstream-main-kkiUe

Conversation

@ericmj
Copy link
Copy Markdown
Member

@ericmj ericmj commented Apr 25, 2026

  • docstring: replace idle_limit (a count) with 2 * idle_interval in the worst-case idle-wait formula; the addition was dimensionally incorrect.
  • docstring: drop "and on checkout" — conn(:ts) is set only at connection establishment, never reset on checkout.
  • docstring: fix "you ca set it" typo.
  • connection_pool: reject negative or descending :max_lifetime ranges (e.g. 100..50//1) at init instead of letting them flow into :erlang.phash2/2 and be silently swallowed by the rescue in Holder.maybe_disconnect/4.
  • holder: rename misspelled ellapsed to elapsed.

- docstring: replace `idle_limit` (a count) with `2 * idle_interval`
  in the worst-case idle-wait formula; the addition was dimensionally
  incorrect.
- docstring: drop "and on checkout" — `conn(:ts)` is set only at
  connection establishment, never reset on checkout.
- docstring: fix "you ca set it" typo.
- connection_pool: reject negative or descending `:max_lifetime`
  ranges (e.g. `100..50//1`) at init instead of letting them flow
  into `:erlang.phash2/2` and be silently swallowed by the rescue
  in `Holder.maybe_disconnect/4`.
- holder: rename misspelled `ellapsed` to `elapsed`.
@josevalim josevalim merged commit 4d7d6d8 into elixir-ecto:master Apr 25, 2026
2 checks passed
@josevalim
Copy link
Copy Markdown
Member

💚 💙 💜 💛 ❤️

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