Skip to content

Commit

Permalink
Rename net_http_max_connections to http_max_connections
Browse files Browse the repository at this point in the history
We're going to use it to cap other outgoing http connections also.
  • Loading branch information
msullivan committed Oct 23, 2024
1 parent b572793 commit 0ff0236
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
5 changes: 2 additions & 3 deletions docs/reference/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ Resource usage
:eql:synopsis:`shared_buffers -> cfg::memory`
The amount of memory used for shared memory buffers.

:eql:synopsis:`net_http_max_connections -> int64`
The maximum number of concurrent HTTP connections to allow when using the
``std::net::http`` module.
:eql:synopsis:`http_max_connections -> int64`
The maximum number of concurrent outbound HTTP connections to allow.

Query planning
--------------
Expand Down
2 changes: 1 addition & 1 deletion edb/buildmeta.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
# The merge conflict there is a nice reminder that you probably need
# to write a patch in edb/pgsql/patches.py, and then you should preserve
# the old value.
EDGEDB_CATALOG_VERSION = 2024_10_17_00_00
EDGEDB_CATALOG_VERSION = 2024_10_23_00_00
EDGEDB_MAJOR_VERSION = 6


Expand Down
4 changes: 2 additions & 2 deletions edb/lib/cfg.edgeql
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ ALTER TYPE cfg::AbstractConfig {
'Where the query cache is finally stored';
};

# std::net::http Configuration
CREATE PROPERTY net_http_max_connections -> std::int64 {
# HTTP Worker Configuration
CREATE PROPERTY http_max_connections -> std::int64 {
SET default := 10;
CREATE ANNOTATION std::description :=
'The maximum number of concurrent HTTP connections.';
Expand Down
12 changes: 6 additions & 6 deletions edb/server/net_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@


async def _http_task(tenant: edbtenant.Tenant, http_client) -> None:
net_http_max_connections = tenant._server.config_lookup(
'net_http_max_connections', tenant.get_sys_config()
http_max_connections = tenant._server.config_lookup(
'http_max_connections', tenant.get_sys_config()
)
http_client._update_limit(net_http_max_connections)
http_client._update_limit(http_max_connections)
try:
async with (asyncio.TaskGroup() as g,):
for db in tenant.iter_dbs():
Expand Down Expand Up @@ -171,10 +171,10 @@ def _process_message(self, msg):


def create_http(tenant: edbtenant.Tenant):
net_http_max_connections = tenant._server.config_lookup(
'net_http_max_connections', tenant.get_sys_config()
http_max_connections = tenant._server.config_lookup(
'http_max_connections', tenant.get_sys_config()
)
return HttpClient(net_http_max_connections)
return HttpClient(http_max_connections)


async def http(server: edbserver.BaseServer) -> None:
Expand Down

0 comments on commit 0ff0236

Please sign in to comment.