[sr-dev] git:master:fe2dfebf: Revert "dialog: add parameter to configure synchronisation of all dialog states to DB"

Henning Westerholt hw at skalatan.de
Sun Jun 14 17:15:08 CEST 2020


Module: kamailio
Branch: master
Commit: fe2dfebf7b8da99b40f0f21a0cfbf05b9534899f
URL: https://github.com/kamailio/kamailio/commit/fe2dfebf7b8da99b40f0f21a0cfbf05b9534899f

Author: Henning Westerholt <hw at skalatan.de>
Committer: Henning Westerholt <hw at skalatan.de>
Date: 2020-06-14T15:09:25Z

Revert "dialog: add parameter to configure synchronisation of all dialog states to DB"

This reverts commit 37d83a5838a50350563f19387fad455d6a433a02 for now.

It needs more rectoring and some extensions in the DB access layer for this module.

---

Modified: src/modules/dialog/dialog.c
Modified: src/modules/dialog/dlg_db_handler.c
Modified: src/modules/dialog/doc/dialog_admin.xml

---

Diff:  https://github.com/kamailio/kamailio/commit/fe2dfebf7b8da99b40f0f21a0cfbf05b9534899f.diff
Patch: https://github.com/kamailio/kamailio/commit/fe2dfebf7b8da99b40f0f21a0cfbf05b9534899f.patch

---

diff --git a/src/modules/dialog/dialog.c b/src/modules/dialog/dialog.c
index 0078ee7468..61e4b0cbcf 100644
--- a/src/modules/dialog/dialog.c
+++ b/src/modules/dialog/dialog.c
@@ -114,7 +114,6 @@ int dlg_noack_timeout = 60;
 int dlg_end_timeout = 300;
 
 int dlg_enable_dmq = 0;
-int dlg_update_all_states = 1;
 
 int dlg_event_rt[DLG_EVENTRT_MAX];
 str dlg_event_callback = STR_NULL;
@@ -328,7 +327,6 @@ static param_export_t mod_params[]={
 	{ "h_id_start",            PARAM_INT, &dlg_h_id_start           },
 	{ "h_id_step",             PARAM_INT, &dlg_h_id_step            },
 	{ "keep_proxy_rr",         INT_PARAM, &dlg_keep_proxy_rr        },
-	{ "update_all_states",     INT_PARAM, &dlg_update_all_states    },
 	{ 0,0,0 }
 };
 
diff --git a/src/modules/dialog/dlg_db_handler.c b/src/modules/dialog/dlg_db_handler.c
index df43c7e618..1325469675 100644
--- a/src/modules/dialog/dlg_db_handler.c
+++ b/src/modules/dialog/dlg_db_handler.c
@@ -81,7 +81,6 @@ static db1_con_t* dialog_db_handle    = 0; /* database connection handle */
 static db_func_t dialog_dbf;
 
 extern int dlg_enable_stats;
-extern int dlg_update_all_states;
 extern int dlg_h_id_start;
 extern int dlg_h_id_step;
 
@@ -816,7 +815,7 @@ int update_dialog_dbinfo_unsafe(struct dlg_cell * cell)
 			&sflags_column, /*18*/     &toroute_name_column, /*19*/ &req_uri_column, /*20*/
 			&xdata_column, /*21*/      &iflags_column  /*22*/ };
 
-	if((dlg_update_all_states == 0) && (cell->state<DLG_STATE_EARLY || cell->state==DLG_STATE_DELETED)) {
+	if(cell->state<DLG_STATE_EARLY || cell->state==DLG_STATE_DELETED) {
 		LM_DBG("not storing dlg in db during initial or deleted states\n");
 		return 0;
 	}
diff --git a/src/modules/dialog/doc/dialog_admin.xml b/src/modules/dialog/doc/dialog_admin.xml
index 1940a968e3..987bd54545 100644
--- a/src/modules/dialog/doc/dialog_admin.xml
+++ b/src/modules/dialog/doc/dialog_admin.xml
@@ -82,8 +82,7 @@
 			<para><emphasis>5</emphasis> : Deleted dialog</para>
 		</listitem>
 	</itemizedlist>
-	<para>The early and deleted dialog states are updated in database storage,
-	unless deactivated with the <emphasis>update_all_states</emphasis> parameter.
+	<para>The early and deleted dialog states are not updated in database storage.
 	</para>
 	</section>
 
@@ -1641,39 +1640,6 @@ modparam("dialog", "keep_proxy_rr", 1)
 </programlisting>
 		</example>
 	</section>
-
-	<section id="dialog.p.update_all_states">
-		<title><varname>update_all_states</varname> (string)</title>
-		<para>
-			When enabled the dialog modules will also synchronize the
-			early and deleted dialog states to the database. This is
-			useful in failover situations, but of course will generate
-			more load to the database from this module.
-		</para>
-		<para>
-			Valid values are:
-		</para>
-		<itemizedlist>
-			<listitem><para>
-				<emphasis>0</emphasis> - Don't synchronize early and deleted dialogs
-			</para></listitem>
-			<listitem><para>
-				<emphasis>1</emphasis> - Synchronize early and deleted dialogs
-			</para></listitem>
-		</itemizedlist>
-		<emphasis>
-			Default value is <quote>1</quote>.
-		</emphasis>
-		<example>
-		<title>Set <varname>update_all_states</varname> parameter</title>
-		<programlisting format="linespecific">
-...
-modparam("dialog", "update_all_states", 1)
-...
-</programlisting>
-		</example>
-	</section>
-
 	</section>
 
 	<section>




More information about the sr-dev mailing list