Implement worker queue limit for outgoing pools#4599
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4599 +/- ##
==========================================
- Coverage 86.03% 86.03% -0.01%
==========================================
Files 565 565
Lines 33920 33918 -2
==========================================
- Hits 29184 29182 -2
Misses 4736 4736 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bd16c7e to
89f1d24
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Make sure it is set only for best_worker
If the shortest queue is longer than the limit, exit:no_available_workers is raised (like for next_available_worker).
89f1d24 to
abf9204
Compare
abf9204 to
551ed6b
Compare
This comment was marked as outdated.
This comment was marked as outdated.
|
elasticsearch_and_cassandra_28 / elasticsearch_and_cassandra_mnesia / 551ed6b small_tests_27 / small_tests / 551ed6b small_tests_28 / small_tests / 551ed6b small_tests_28_arm64 / small_tests / 551ed6b ldap_mnesia_27 / ldap_mnesia / 551ed6b ldap_mnesia_28 / ldap_mnesia / 551ed6b dynamic_domains_mysql_redis_28 / mysql_redis / 551ed6b internal_mnesia_28 / internal_mnesia / 551ed6b dynamic_domains_pgsql_mnesia_27 / pgsql_mnesia / 551ed6b dynamic_domains_pgsql_mnesia_28 / pgsql_mnesia / 551ed6b pgsql_cets_28 / pgsql_cets / 551ed6b mysql_redis_28 / mysql_redis / 551ed6b dynamic_domains_mssql_mnesia_28 / odbc_mssql_mnesia / 551ed6b cockroachdb_cets_28 / cockroachdb_cets / 551ed6b mod_ping_SUITE:server_ping:server_ping_pong{error,{test_case_failed,"Incorrect number of instrumentation events - matched: 0, expected: 1"}}pubsub_SUITE:dag+last_item_cache:send_last_published_item_no_items_test{error,
{timeout_when_waiting_for_stanza,
[{escalus_client,wait_for_stanza,
[{client,
<<"alice_send_last_published_item_no_items_test_3717@localhost/res1">>,
escalus_tcp,<0.115329.0>,
[{event_manager,<0.115319.0>},
{server,<<"localhost">>},
{username,
<<"alicE_send_last_published_item_no_items_test_3717">>},
{resource,<<"res1">>}],
[{event_client,
[{event_manager,<0.115319.0>},
{server,<<"localhost">>},
{username,
<<"alicE_send_last_published_item_no_items_test_3717">>},
{resource,<<"res1">>}]},
{resource,<<"res1">>},
{username,
<<"alice_send_last_published_item_no_items_test_3717">>},
{server,<<"localhost">>},
{host,<<"localhost">>},
{port,5222},
{auth,fun escalus_auth:auth_plain/2},
{wspath,undefined},
{username,
<<"alicE_send_last_published_item_no_items_test_3717">>},
{server,<<"localhost">>},
{password,<<"matygrysa">>},
{stream_id,<<"74346cbd7eb4265f">>}]},
5000],
[{file,
"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
{line,136}]},
{pubsub_tools,receive_response,3,
[{file,"/home/circleci/project/big_tests/tests/pubsub_tools.erl"},
{line,444}]},
{pubsub_tools,receive_and_c...pubsub_SUITE:dag+last_item_cache:send_last_published_item_no_items_test{error,
{timeout_when_waiting_for_stanza,
[{escalus_client,wait_for_stanza,
[{client,
<<"alice_send_last_published_item_no_items_test_3719@localhost/res1">>,
escalus_tcp,<0.115407.0>,
[{event_manager,<0.115386.0>},
{server,<<"localhost">>},
{username,
<<"alicE_send_last_published_item_no_items_test_3719">>},
{resource,<<"res1">>}],
[{event_client,
[{event_manager,<0.115386.0>},
{server,<<"localhost">>},
{username,
<<"alicE_send_last_published_item_no_items_test_3719">>},
{resource,<<"res1">>}]},
{resource,<<"res1">>},
{username,
<<"alice_send_last_published_item_no_items_test_3719">>},
{server,<<"localhost">>},
{host,<<"localhost">>},
{port,5222},
{auth,fun escalus_auth:auth_plain/2},
{wspath,undefined},
{username,
<<"alicE_send_last_published_item_no_items_test_3719">>},
{server,<<"localhost">>},
{password,<<"matygrysa">>},
{stream_id,<<"62234100b05590e6">>}]},
5000],
[{file,
"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
{line,136}]},
{pubsub_tools,receive_response,3,
[{file,"/home/circleci/project/big_tests/tests/pubsub_tools.erl"},
{line,444}]},
{pubsub_tools,receive_and_c...pubsub_SUITE:dag+last_item_cache:send_last_published_item_no_items_test{error,
{timeout_when_waiting_for_stanza,
[{escalus_client,wait_for_stanza,
[{client,
<<"alice_send_last_published_item_no_items_test_3722@localhost/res1">>,
escalus_tcp,<0.115483.0>,
[{event_manager,<0.115464.0>},
{server,<<"localhost">>},
{username,
<<"alicE_send_last_published_item_no_items_test_3722">>},
{resource,<<"res1">>}],
[{event_client,
[{event_manager,<0.115464.0>},
{server,<<"localhost">>},
{username,
<<"alicE_send_last_published_item_no_items_test_3722">>},
{resource,<<"res1">>}]},
{resource,<<"res1">>},
{username,
<<"alice_send_last_published_item_no_items_test_3722">>},
{server,<<"localhost">>},
{host,<<"localhost">>},
{port,5222},
{auth,fun escalus_auth:auth_plain/2},
{wspath,undefined},
{username,
<<"alicE_send_last_published_item_no_items_test_3722">>},
{server,<<"localhost">>},
{password,<<"matygrysa">>},
{stream_id,<<"016cc32f9c0bfb29">>}]},
5000],
[{file,
"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
{line,136}]},
{pubsub_tools,receive_response,3,
[{file,"/home/circleci/project/big_tests/tests/pubsub_tools.erl"},
{line,444}]},
{pubsub_tools,receive_and_c...pgsql_mnesia_27 / pgsql_mnesia / 551ed6b pgsql_mnesia_28 / pgsql_mnesia / 551ed6b mssql_mnesia_28 / odbc_mssql_mnesia / 551ed6b cockroachdb_cets_28 / cockroachdb_cets / 551ed6b pubsub_SUITE:tree+last_item_cache:send_last_published_item_no_items_test{error,
{timeout_when_waiting_for_stanza,
[{escalus_client,wait_for_stanza,
[{client,
<<"alice_send_last_published_item_no_items_test_142@localhost/res1">>,
escalus_tcp,<0.4027.0>,
[{event_manager,<0.4015.0>},
{server,<<"localhost">>},
{username,
<<"alicE_send_last_published_item_no_items_test_142">>},
{resource,<<"res1">>}],
[{event_client,
[{event_manager,<0.4015.0>},
{server,<<"localhost">>},
{username,
<<"alicE_send_last_published_item_no_items_test_142">>},
{resource,<<"res1">>}]},
{resource,<<"res1">>},
{username,
<<"alice_send_last_published_item_no_items_test_142">>},
{server,<<"localhost">>},
{host,<<"localhost">>},
{port,5222},
{auth,fun escalus_auth:auth_plain/2},
{wspath,undefined},
{username,
<<"alicE_send_last_published_item_no_items_test_142">>},
{server,<<"localhost">>},
{password,<<"matygrysa">>},
{stream_id,<<"0a6ede7f682821b3">>}]},
5000],
[{file,
"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
{line,136}]},
{pubsub_tools,receive_response,3,
[{file,"/home/circleci/project/big_tests/tests/pubsub_tools.erl"},
{line,444}]},
{pubsub_tools,receive_and_check_respon... |
The goal of this PR is to replace the max_worker_queue_len config option with a new mechanism, because:
The new implementation drops the request just like the next_available_worker strategy.
Notes:
best_workerwith a hard queue limit.max_worker_queue_lenoption is removed to avoid confusion and to simplify implementation.