Skip to content
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

Supress RDBMS warnings about pool not running in mongoose_cets_discovery_rdbms #4108

Merged
merged 1 commit into from
Aug 24, 2023

Conversation

arcusfelis
Copy link
Contributor

This PR addresses "MIM-1998 Errors in logs for CETS + RDBMS"

Proposed changes include:

  • Check if rdbms has started before trying to get a list of nodes

Fixes:

when=2023-08-09T14:34:46.376379+00:00 level=error what=discovery_failed_select reason=badarg pid=<0.601.0> at=mongoose_cets_discovery_rdbms:get_nodes/1:28 stacktrace="ets:insert_new/2:0 mongoose_rdbms:prepare/4:224 mongoose_cets_discovery_rdbms:prepare/0:61 mongoose_cets_discovery_rdbms:try_register/2:35 mongoose_cets_discovery_rdbms:get_nodes/1:22 cets_discovery:handle_check/1:125 cets_discovery:handle_call/3:94 gen_server:try_handle_call/4:1113" stacktrace_args="[prepared_statements,\
 {cets_disco_select,<<\"discovery_nodes\">>,\
                    [<<\"cluster_name\">>],\
                    <<\"SELECT node_name, node_num FROM discovery_nodes WHERE cluster_name = ?\">>}]"
when=2023-08-09T14:34:46.377789+00:00 level=error what=discovery_failed_select reason=badarg pid=<0.601.0> at=mongoose_cets_discovery_rdbms:get_nodes/1:28 stacktrace="ets:insert_new/2:0 mongoose_rdbms:prepare/4:224 mongoose_cets_discovery_rdbms:prepare/0:61 mongoose_cets_discovery_rdbms:try_register/2:35 mongoose_cets_discovery_rdbms:get_nodes/1:22 cets_discovery:handle_check/1:125 cets_discovery:handle_call/3:94 gen_server:try_handle_call/4:1113" stacktrace_args="[prepared_statements,\
 {cets_disco_select,<<\"discovery_nodes\">>,\
                    [<<\"cluster_name\">>],\
                    <<\"SELECT node_name, node_num FROM discovery_nodes WHERE cluster_name = ?\">>}]"
when=2023-08-09T14:34:46.377961+00:00 level=error what=discovery_failed_select reason=badarg pid=<0.601.0> at=mongoose_cets_discovery_rdbms:get_nodes/1:28 stacktrace="ets:insert_new/2:0 mongoose_rdbms:prepare/4:224 mongoose_cets_discovery_rdbms:prepare/0:61 mongoose_cets_discovery_rdbms:try_register/2:35 mongoose_cets_discovery_rdbms:get_nodes/1:22 cets_discovery:handle_check/1:125 cets_discovery:handle_call/3:94 gen_server:try_handle_call/4:1113" stacktrace_args="[prepared_statements,\
 {cets_disco_select,<<\"discovery_nodes\">>,\
                    [<<\"cluster_name\">>],\
                    <<\"SELECT node_name, node_num FROM discovery_nodes WHERE cluster_name = ?\">>}]"

@mongoose-im
Copy link
Collaborator

mongoose-im commented Aug 23, 2023

elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / a4f5c7f
Reports root/ big
OK: 369 / Failed: 0 / User-skipped: 38 / Auto-skipped: 0


small_tests_24 / small_tests / a4f5c7f
Reports root / small


small_tests_25 / small_tests / a4f5c7f
Reports root / small


small_tests_25_arm64 / small_tests / a4f5c7f
Reports root / small


ldap_mnesia_24 / ldap_mnesia / a4f5c7f
Reports root/ big
OK: 2275 / Failed: 0 / User-skipped: 831 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / a4f5c7f
Reports root/ big
OK: 4234 / Failed: 0 / User-skipped: 84 / Auto-skipped: 0


dynamic_domains_mysql_redis_25 / mysql_redis / a4f5c7f
Reports root/ big
OK: 4202 / Failed: 0 / User-skipped: 116 / Auto-skipped: 0


ldap_mnesia_25 / ldap_mnesia / a4f5c7f
Reports root/ big
OK: 2275 / Failed: 0 / User-skipped: 831 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / a4f5c7f
Reports root/ big
OK: 4234 / Failed: 0 / User-skipped: 84 / Auto-skipped: 0


internal_mnesia_25 / internal_mnesia / a4f5c7f
Reports root/ big
OK: 2421 / Failed: 0 / User-skipped: 685 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / a4f5c7f
Reports root/ big
OK: 4231 / Failed: 0 / User-skipped: 87 / Auto-skipped: 0


pgsql_cets_25 / pgsql_cets / a4f5c7f
Reports root/ big
OK: 4593 / Failed: 0 / User-skipped: 121 / Auto-skipped: 0


pgsql_mnesia_25 / pgsql_mnesia / a4f5c7f
Reports root/ big
OK: 4623 / Failed: 0 / User-skipped: 91 / Auto-skipped: 0


mysql_redis_25 / mysql_redis / a4f5c7f
Reports root/ big
OK: 4603 / Failed: 0 / User-skipped: 111 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / a4f5c7f
Reports root/ big
OK: 4623 / Failed: 0 / User-skipped: 91 / Auto-skipped: 0


mssql_mnesia_25 / odbc_mssql_mnesia / a4f5c7f
Reports root/ big
OK: 4620 / Failed: 0 / User-skipped: 94 / Auto-skipped: 0

@codecov
Copy link

codecov bot commented Aug 23, 2023

Codecov Report

Patch coverage: 88.88% and project coverage change: -0.01% ⚠️

Comparison is base (3e5d8a2) 83.90% compared to head (a4f5c7f) 83.89%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4108      +/-   ##
==========================================
- Coverage   83.90%   83.89%   -0.01%     
==========================================
  Files         551      551              
  Lines       33589    33596       +7     
==========================================
+ Hits        28182    28187       +5     
- Misses       5407     5409       +2     
Files Changed Coverage Δ
src/mongoose_cets_discovery_rdbms.erl 85.41% <88.88%> (-4.83%) ⬇️

... and 8 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@arcusfelis arcusfelis marked this pull request as ready for review August 23, 2023 21:07
@arcusfelis
Copy link
Contributor Author

package is still failing to build, otherwise ci is green.

Copy link
Member

@chrzaszcz chrzaszcz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. There is still a delay of 5 seconds from cets_discovery:schedule_check/1.

catch Class:Reason:Stacktrace ->
?LOG_ERROR(#{what => discovery_failed_select, class => Class,
reason => Reason, stacktrace => Stacktrace}),
{{error, Reason}, State}
end.

is_rdbms_running() ->
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be here or could be moved into mongoose_rdbms :)

@chrzaszcz chrzaszcz merged commit 0133bc9 into master Aug 24, 2023
3 of 4 checks passed
@chrzaszcz chrzaszcz deleted the supress-rdbms-warnings-in-cets-disco branch August 24, 2023 08:35
@chrzaszcz chrzaszcz added this to the 6.2.0 milestone Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants