Pre-Submission Checklist

Type Of Change

Checklist:

Description

If the query failed, the result set should not be parsed and used. This results in an empty result set which will most likely lead to unwanted behavior.

Background: While troubleshooting, we detected that domain.reload actually replaces domains with an empty result set if mongodb connectivity fails.

DEBUG: db_mongodb [mongodb_dbase.c:849]: db_mongodb_store_result(): An error occurred: No suitable servers found (`serverSelectionTryOnce` set): [connection timeout calling ismaster on 'pdb-iop1-wrmg-2:27017'] [connection timeout calling ismaster on 'pdb-iop1-wrmg-1:27017']
DEBUG: domain [domain.c:365]: reload_tables(): number of rows in domain_attrs table: 0
DEBUG: <core> [db_res.c:79]: db_free_columns(): freeing 0 columns
DEBUG: <core> [db_res.c:138]: db_free_result(): freeing result set at 0x7fb0c9811848
DEBUG: db_mongodb [mongodb_dbase.c:973]: db_mongodb_query(): query to collection [domains]
DEBUG: db_mongodb [mongodb_dbase.c:1007]: db_mongodb_query(): query filter: { }
DEBUG: db_mongodb [mongodb_dbase.c:1043]: db_mongodb_query(): columns filter: { "projection" : { "domain" : 1, "did" : 1 } }

You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/3996

Commit Summary

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/pull/3996@github.com>