* origin/develop: (213 commits)
Apply 1 suggestion(s) to 1 file(s)
ReverseProxy tesla client: remove handling of old_conn
ReverseProxy: Fix a gun connection leak when there is an error with no body
OpenAPI: remove accidentally pasted buffer data
OpenAPI: Replace actor_id by account_id to follow ChatMessage schema
Update types in Pleroma.Formatter group
added migrate old settings to new
Ensure Oban is available during mix tasks. Fixes: mix pleroma.user rm username
Fix mix tasks that make HTTP calls by starting the Gun connection pool
remove duplicate module
Support blocking via query parameters as well and document the change.
[#2791] AccountView: renamed `:force` option to `:skip_visibility_check`.
added warning to use old keys
Update linkify migration tests to use config from ConfigDB
Migration to fix malformed Pleroma.Formatter config
Refactor require_migration/1 into a test helper function
Add AutolinkerToLinkify migration test
Fix linkify ConfigDB migration
[#1973] Fixed accounts rendering in GET /api/v1/pleroma/chats with truish :restrict_unauthenticated. Made `Pleroma.Web.MastodonAPI.AccountView.render("show.json", _)` demand :for or :force option in order to prevent incorrect rendering of empty map instead of expected user representation with truish :restrict_unauthenticated setting.
Add related_policy field
...
The new pooling code just removes the connection when it's down,
there is no need to reconnect a connection that is just sitting idle,
better just open a new one next time it's needed
`:retry_timeout` and `:retry` got removed because reconnecting on failure is
something the new pool intentionally doesn't do.
`:max_overflow` had to go in favor of `:max_waiting`, I didn't reuse the key because
the settings are very different in their behaviour.
`:checkin_timeout` got removed in favor of `:connection_acquisition_wait`,
I didn't reuse the key because the settings are somewhat different.
I didn't do any migrations/deprecation warnings/changelog entries because
these settings were never in stable.
This patch refactors gun pooling to use Elixir process registry and
simplifies adapter option insertion.
Having the pool use process registry instead of a GenServer has a number of advantages:
- Simpler code: the initial implementation adds about half the lines of code it deletes
- Concurrency: unlike a GenServer, ETS-based registry can handle multiple checkout/checkin
requests at the same time
- Precise and easy idle connection clousure: current proposal for closing idle connections in
the GenServer-based pool needs to filter through all connections once a minute and compare their
last active time with closing time. With Elixir process registry this can be done
by just using `Process.send_after`/`Process.cancel_timer` in the worker process.
- Lower memory footprint: In my tests `gun-memory-leak` branch uses about 290mb on peak load (250 connections)
and 235mb on idle (5-10 connections). Registry-based pool uses 210mb on idle and 240mb on peak load