-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C2s/stream management #3796
C2s/stream management #3796
Conversation
Codecov ReportBase: 70.36% // Head: 70.77% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## feature/mongoose_c2s #3796 +/- ##
========================================================
+ Coverage 70.36% 70.77% +0.41%
========================================================
Files 536 536
Lines 34879 35209 +330
========================================================
+ Hits 24541 24919 +378
+ Misses 10338 10290 -48
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
c28f2e0
to
332cfb3
Compare
This comment was marked as outdated.
This comment was marked as outdated.
332cfb3
to
0cb17d8
Compare
This comment was marked as outdated.
This comment was marked as outdated.
0cb17d8
to
24e6033
Compare
This comment was marked as outdated.
This comment was marked as outdated.
24e6033
to
8bd03e6
Compare
This comment was marked as outdated.
This comment was marked as outdated.
8bd03e6
to
796d732
Compare
This comment was marked as outdated.
This comment was marked as outdated.
796d732
to
b09f682
Compare
This comment was marked as outdated.
This comment was marked as outdated.
b09f682
to
e67ff6d
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.
55d1c0d
to
3f9814d
Compare
This comment was marked as outdated.
This comment was marked as outdated.
611f41f
to
d0f4bcd
Compare
This comment was marked as outdated.
This comment was marked as outdated.
d0f4bcd
to
abd341f
Compare
This comment was marked as outdated.
This comment was marked as outdated.
2a2a32f
to
8f47f49
Compare
User-send-packet is currently passing many more stanza types that this won't match on. It needs a future refactor to use the more granular hooks.
Some things might be required to happen while the session is still registered, like distributing presences, while others when it is not anymore, like rerouting stream-management buffers, which otherwise would be rerouted to itself in an infinite loop.
f781907
to
437184b
Compare
This comment was marked as outdated.
This comment was marked as outdated.
437184b
to
3c8c52a
Compare
This comment was marked as outdated.
This comment was marked as outdated.
3c8c52a
to
b5d9f73
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.
d0236d8
to
a538b53
Compare
small_tests_24 / small_tests / a538b53 small_tests_25 / small_tests / a538b53 ldap_mnesia_24 / ldap_mnesia / a538b53 ldap_mnesia_25 / ldap_mnesia / a538b53 pgsql_mnesia_24 / pgsql_mnesia / a538b53 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / a538b53 internal_mnesia_25 / internal_mnesia / a538b53 elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / a538b53 riak_mnesia_24 / riak_mnesia / a538b53 pubsub_SUITE:tree+basic:publish_only_retract_items_scope_test{error,{{badmatch,false},
[{pubsub_tools,check_response,2,
[{file,"/home/circleci/project/big_tests/tests/pubsub_tools.erl"},
{line,491}]},
{pubsub_tools,receive_response,3,
[{file,"/home/circleci/project/big_tests/tests/pubsub_tools.erl"},
{line,481}]},
{pubsub_tools,receive_and_check_response,4,
[{file,"/home/circleci/project/big_tests/tests/pubsub_tools.erl"},
{line,471}]},
{escalus_story,story,4,
[{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
{line,72}]},
{test_server,ts_tc,3,[{file,"test_server.erl"},{line,1783}]},
{test_server,run_test_case_eval1,6,
[{file,"test_server.erl"},{line,1292}]},
{test_server,run_test_case_eval,9,
[{file,"test_server.erl"},{line,1224}]}]}} dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / a538b53 dynamic_domains_mysql_redis_25 / mysql_redis / a538b53 pgsql_mnesia_25 / pgsql_mnesia / a538b53 dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / a538b53 mssql_mnesia_25 / odbc_mssql_mnesia / a538b53 mysql_redis_25 / mysql_redis / a538b53 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I just added some minor comments.
1be738a
to
d6b0235
Compare
small_tests_24 / small_tests / d6b0235 small_tests_25 / small_tests / d6b0235 ldap_mnesia_24 / ldap_mnesia / d6b0235 ldap_mnesia_25 / ldap_mnesia / d6b0235 pgsql_mnesia_24 / pgsql_mnesia / d6b0235 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / d6b0235 internal_mnesia_25 / internal_mnesia / d6b0235 elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / d6b0235 dynamic_domains_mysql_redis_25 / mysql_redis / d6b0235 dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / d6b0235 dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / d6b0235 riak_mnesia_24 / riak_mnesia / d6b0235 pgsql_mnesia_25 / pgsql_mnesia / d6b0235 mysql_redis_25 / mysql_redis / d6b0235 mssql_mnesia_25 / odbc_mssql_mnesia / d6b0235 |
small_tests_24 / small_tests / abf9cbb small_tests_25 / small_tests / abf9cbb ldap_mnesia_24 / ldap_mnesia / abf9cbb dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / abf9cbb ldap_mnesia_25 / ldap_mnesia / abf9cbb pgsql_mnesia_24 / pgsql_mnesia / abf9cbb internal_mnesia_25 / internal_mnesia / abf9cbb riak_mnesia_24 / riak_mnesia / abf9cbb elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / abf9cbb dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / abf9cbb dynamic_domains_mysql_redis_25 / mysql_redis / abf9cbb pgsql_mnesia_25 / pgsql_mnesia / abf9cbb dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / abf9cbb mysql_redis_25 / mysql_redis / abf9cbb mssql_mnesia_25 / odbc_mssql_mnesia / abf9cbb |
The first few commits fix things not necessarily related to implementing stream management but come as a side necessity:
user_send_packet
runs with more kinds of packets, like for stream management, metrics would fail to match a non-standard stanza.socket_send
key in the c2s acc had the problem that it would bypass all the processing foruser_receive_packet
, which would then break stream management, so I had to update the usages ofsocket_send
to a newroute
key, that would trigger a route event and do all the processing related, bringing it closer to how older code used to trigger aejabberd_router:route/4
call.Now, for stream management, it registers on the following events:
gen_statem:call
s where a different process is asking to resume this current session, and timeouts when the buffer has been full for long enough, to decide if SM has to take control or not.gen_statem
callback module.