Hi
I've two servers sharing the same postgres database, using kamailio's "server_id" value. One has server_id=184 and the other has server_id=186.
I've set these parameters. modparam("usrloc", "server_id_filter", 1) modparam("usrloc", "db_mode", 1) modparam("usrloc", "db_ops_ruid", 1) # I've tested this with both 0 and 1.
When a user REGISTERs, I see data being written to two tables, as normal, from server 184. update location set expires='2025-06-11 16:31:58' ... server_id=184 ...' where ruid='uloc-b8-684999a9-31e-1' delete from location_attrs where ruid='uloc-b8-684999a9-31e-1' insert into location_attrs (username,ruid,...) values (...'uloc-b8-684999a9-31e-1' ...
The problem comes when I start server 186. select contact,... etc. ..., username from location where server_id=186 select username,ruid,aname,atype,avalue from location_attrs delete from location_attrs where ruid='uloc-b8-684999a9-31e-1'
What I see is that server 186 always deletes the data from the location_attrs table that belongs to server 184, which I don't think it should do. According to the usrloc documentation, server_id_filter must be set (as I've done) or "Otherwise one instance of proxy cleans records made by another proxy and that breaks its cache."
Therefore this looks like a usrloc bug to me. Am I doing something wrong? I'm testing with a commit that was made yesterday (kamailio 6.1.0-dev1).
James
Hello,
it looks that the location_attrs functionality does not take in account the server_id, at least in db_mode 1.
You could create an issue about it, or investigate the code to create a pull-request if possible.
Cheers,
Henning
-----Original Message----- From: James Browne via sr-users sr-users@lists.kamailio.org Sent: Mittwoch, 11. Juni 2025 17:53 To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Cc: James Browne james@frideo.com Subject: [SR-Users] usrloc deletes other server's data (suspected bug)
Hi
I've two servers sharing the same postgres database, using kamailio's "server_id" value. One has server_id=184 and the other has server_id=186.
I've set these parameters. modparam("usrloc", "server_id_filter", 1) modparam("usrloc", "db_mode", 1) modparam("usrloc", "db_ops_ruid", 1) # I've tested this with both 0 and 1.
When a user REGISTERs, I see data being written to two tables, as normal, from server 184. update location set expires='2025-06-11 16:31:58' ... server_id=184 ...' where ruid='uloc-b8-684999a9-31e-1' delete from location_attrs where ruid='uloc-b8-684999a9-31e-1' insert into location_attrs (username,ruid,...) values (...'uloc-b8-684999a9-31e-1' ...
The problem comes when I start server 186. select contact,... etc. ..., username from location where server_id=186 select username,ruid,aname,atype,avalue from location_attrs delete from location_attrs where ruid='uloc-b8-684999a9-31e-1'
What I see is that server 186 always deletes the data from the location_attrs table that belongs to server 184, which I don't think it should do. According to the usrloc documentation, server_id_filter must be set (as I've done) or "Otherwise one instance of proxy cleans records made by another proxy and that breaks its cache."
Therefore this looks like a usrloc bug to me. Am I doing something wrong? I'm testing with a commit that was made yesterday (kamailio 6.1.0-dev1).
James __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions -- sr- users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!