-
Notifications
You must be signed in to change notification settings - Fork 421
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
mod_bosh config in a map #3540
mod_bosh config in a map #3540
Conversation
2245501
to
bfde9e9
Compare
Codecov Report
@@ Coverage Diff @@
## master #3540 +/- ##
=======================================
Coverage 81.08% 81.09%
=======================================
Files 419 420 +1
Lines 32284 32285 +1
=======================================
+ Hits 26176 26180 +4
+ Misses 6108 6105 -3
Continue to review full report at Codecov.
|
3b240d3
to
a8baf76
Compare
This comment was marked as outdated.
This comment was marked as outdated.
a8baf76
to
2af292c
Compare
This comment was marked as outdated.
This comment was marked as outdated.
4dc4aac
to
24ff707
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.
24ff707
to
45078ae
Compare
This comment was marked as outdated.
This comment was marked as outdated.
small_tests_24 / small_tests / 978d117 small_tests_23 / small_tests / 978d117 dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / 978d117 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 978d117 dynamic_domains_mysql_redis_24 / mysql_redis / 978d117 dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 978d117 ldap_mnesia_23 / ldap_mnesia / 978d117 ldap_mnesia_24 / ldap_mnesia / 978d117 internal_mnesia_24 / internal_mnesia / 978d117 pgsql_mnesia_23 / pgsql_mnesia / 978d117 pgsql_mnesia_24 / pgsql_mnesia / 978d117 mysql_redis_24 / mysql_redis / 978d117 elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 978d117 mssql_mnesia_24 / odbc_mssql_mnesia / 978d117 riak_mnesia_24 / riak_mnesia / 978d117 |
c4ea8ab
to
bfd1f23
Compare
- Fix broken 'catch' - the generated tuple would lead to a crash - Get options from a map or a list - Make it possible to use the defaults from the config spec
This comment was marked as outdated.
This comment was marked as outdated.
Make it global because: - There is only one implementation, which stores all sessions in one table - The node_cleanup hook is global
This way it is set only once for mongoose_backend and system metrics
Also: - Use mod_bosh_backend - Avoid duplicate hook registration, which caused startup warnings - Set backend in the config spec even if there is only one - Respond with host-unknown when mod_bosh is disabled for a host type Motivation: set in only once, use it in system metrics
bfd1f23
to
8a77178
Compare
Also: - make it possible to reuse the same helpers in small and big tests - check backend for mod_bosh and mod_auth_token in tests
- Test the case when mod_bosh is disabled for a host type - Handle the case when server sends stream features separately This happens when the 'accumulate' timeout (10 msec) passes. It does not happen on CI and happens locally only if the test is the first one (they are shuffled) and the server has just started. It is not a bug. - Restore module config properly
This option can be useful when developing a custom backend. It is also better not to have undocumented options. Also: update time unit
8a77178
to
0ceb574
Compare
small_tests_24 / small_tests / 0ceb574 small_tests_23 / small_tests / 0ceb574 dynamic_domains_mysql_redis_24 / mysql_redis / 0ceb574 dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 0ceb574 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 0ceb574 dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / 0ceb574 ldap_mnesia_23 / ldap_mnesia / 0ceb574 ldap_mnesia_24 / ldap_mnesia / 0ceb574 internal_mnesia_24 / internal_mnesia / 0ceb574 pgsql_mnesia_24 / pgsql_mnesia / 0ceb574 mysql_redis_24 / mysql_redis / 0ceb574 elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 0ceb574 mssql_mnesia_24 / odbc_mssql_mnesia / 0ceb574 riak_mnesia_24 / riak_mnesia / 0ceb574 |
riak_mnesia_24 / riak_mnesia / bfd1f23 |
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.
Thanks for the changes! I like the backend added, and the common test helper especially.
Main changes:
mod_bosh
options in a map with defaults.mongoose_backend
inmod_bosh
. Make it global as the only backend (mnesia
) uses Mnesia globally and thenode_cleanup
hook is global as well. Start it only once to avoid warnings for duplicated hooks.backend
in the config spec formod_bosh
andmod_auth_token
even if there is only one backend to avoid setting it in multiple places (system metrics, backend module). Document it as well - for consistency and to simplify adding new custom backends.Other changes:
mod_bosh
config match the docs (time units, positive vs. non-negative integers).mongoose_module_metrics
to work with module opts in maps and use the defaults.