The dbmode behavior was modified (see the commit reference bellow) and does not clearly
align with the documentation anymore, I still need the feature when we can persist htable
records that were inserted at runtime.
In fact I do not understand that value of writing back only records that where loaded from
the DB, this seems equivalent to dbmode 0 (if the db is not altered) ?
Maybe you can help me understand why we the change is needed @miconda ?
dbmode - if set to 1, the content of hash table is written to database table when the SIP
server is stopped (i.e., ensure persistency over restarts). Default value is 0 (no write
back to db table).
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Wed Apr 13 13:11:30 2022 +0200
htable: track when records were successfully loaded from database
- write back only in such case
diff --git a/src/modules/htable/ht_api.c b/src/modules/htable/ht_api.c
index 00023e7153..f212600e21 100644
@@ -1099,7 +1099,7 @@ int ht_db_sync_tables(void)
ht = _ht_root;
- if(ht->dbtable.len>0 && ht->dbmode!=0 &&
+ if(ht->dbtable.len>0 && ht->dbmode!=0 &&
ht->dbload!=0 && ht->ncols==0)
LM_DBG("sync db table [%.*s] from ht [%.*s]\n",
Reply to this email directly or view it on GitHub:
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3422(a)github.com>