### Description
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).
```
```
commit b1fa63b1547fc5af6cc1e97db42ea76db1bf927b
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
--- a/src/modules/htable/ht_api.c
+++ b/src/modules/htable/ht_api.c
@@ -1099,7 +1099,7 @@ int ht_db_sync_tables(void)
ht = _ht_root;
while(ht)
{
- if(ht->dbtable.len>0 && ht->dbmode!=0 &&
ht->ncols==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",
ht->dbtable.len, ht->dbtable.s,
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3422
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3422(a)github.com>