[SR-Users] mtree reload commands don't remove items from memory

Daniel-Constantin Mierla miconda at gmail.com
Sun May 18 17:02:59 CEST 2014


I guess you are talking about master/development branch, isn't it?

Cheers,
Daniel

On 18/05/14 15:41, Juha Heinanen wrote:
> i started to wonder why routing was sometimes wrong in my proxy and
> after studying the issue, i came to the conclusion that mtree reload
> commands (mi or rpc) don't remove entries from memory when they are
> removed from database.
>
> i started my proxy with empty mtrees db table (and empty memory table):
>
> # sip-proxy_ctl mi mt_summary
> MT::  TNAME=lp_out TTYPE=0 MEMSIZE=0 NRNODES=0 NRITEMS=0 RELOADCOUNT=0 RELOADTIME=1400419785
>
> then i added one entry to db table and gave reload command.  after that
> one entry correctly showed up in memory table:
>
> # sip-proxy_ctl mi mt_summary
> MT::  TNAME=lp_out TTYPE=0 MEMSIZE=1636 NRNODES=6 NRITEMS=1 RELOADCOUNT=1 RELOADTIME=1400419817
>
> then i deleted the only entry from db, verified with phpmyadmin that
> the table really was empty, and gave again reload command.  that command
> didn't have any effect in memory table:
>
> # sip-proxy_ctl mi mt_summary
> MT::  TNAME=lp_out TTYPE=0 MEMSIZE=1636 NRNODES=6 NRITEMS=1 RELOADCOUNT=1 RELOADTIME=1400419817
>
> not even reload count got incremented.
>
> after that i went and added some debug to rpc_mtree_reload function and
> got this:
>
> May 18 16:30:17 siika /usr/sbin/sip-proxy[26536]: INFO: mtree [mtree_mod.c:1169]: rpc_mtree_reload(): reloading from db 'lp_out'
>
> the info is here:
>
> 		LM_INFO("reloading from db '%.*s'\n", pt->tname.len, pt->tname.s);
> 				if(mt_load_db(pt)!=0)
> 				{
> 					LM_ERR("cannot re-load mtree from database\n");	
> 					goto error;
> 				}
>
> my conclusion is that mt_load_db() function is somehow broken.
>
> -- juha
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda




More information about the sr-users mailing list