Hi!
db_mysql in devel now has transaction support, which should work with presence. It's contributed by Håkon Nassjöen that responded to my cry for help in the Google+ Kamailio group!
Thanks, Håkon!
/O
Hi Olle,
The new dbb->query_lock function needs to be implemented too.
Regards,
Peter
On 02/04/13 13:16, Olle E. Johansson wrote:
Hi!
db_mysql in devel now has transaction support, which should work with presence. It's contributed by Håkon Nassjöen that responded to my cry for help in the Google+ Kamailio group!
Thanks, Håkon!
/O _______________________________________________ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
I will look at it,
Håkon
On 2 April 2013 14:25, Peter Dunkley peter.dunkley@crocodile-rcs.comwrote:
Hi Olle,
The new dbb->query_lock function needs to be implemented too.
Regards,
Peter
On 02/04/13 13:16, Olle E. Johansson wrote:
Hi!
db_mysql in devel now has transaction support, which should work with presence. It's contributed by Håkon Nassjöen that responded to my cry for help in the Google+ Kamailio group!
Thanks, Håkon!
/O ______________________________**_________________ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**devhttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
______________________________**_________________ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**devhttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Hi Peter,
I see that query_lock is supposed to lock the rows that it specifies.
MySQL only supports locks on rows with the InnoDB engine. But as far as I know, when installing the mysql tables with kamdbctl, the tables are added with the MyISAM engine.
So, should I start modifying the install scripts so that we use InnoDB engine, or is a table-lock sufficient when myisam is used? Mysql will not give an error if the engine does not support locking on individual rows. So the experience will be transparent for the end user, except for the locking of the whole table.
Also, it is important that the columns that the query compares against, is indexes, or else the table will be locked even if the table engine is InnoDB. I'm not sure if presence only queries for indexed columns?
Regards, Håkon
On 2 April 2013 14:25, Peter Dunkley peter.dunkley@crocodile-rcs.comwrote:
Hi Olle,
The new dbb->query_lock function needs to be implemented too.
Regards,
Peter
On 02/04/13 13:16, Olle E. Johansson wrote:
Hi!
db_mysql in devel now has transaction support, which should work with presence. It's contributed by Håkon Nassjöen that responded to my cry for help in the Google+ Kamailio group!
Thanks, Håkon!
/O ______________________________**_________________ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**devhttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
______________________________**_________________ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**devhttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Håkon Nessjøen writes:
MySQL only supports locks on rows with the InnoDB engine. But as far as I know, when installing the mysql tables with kamdbctl, the tables are added with the MyISAM engine.
MyISAM should not be hard coded in the mysql scripts. there should be a variable in the beginning of the scripts that tells what engine to use in the same way there are variables for db users/passwords.
So, should I start modifying the install scripts so that we use InnoDB engine, or is a table-lock sufficient when myisam is used? Mysql will not give an error if the engine does not support locking on individual rows. So the experience will be transparent for the end user, except for the locking of the whole table.
it is enough if the issue is described in the README of the modules affected, i.e., a note that tells to use InnoDB engine in order to get locking benefits when db is MySQL.
Also, it is important that the columns that the query compares against, is indexes, or else the table will be locked even if the table engine is InnoDB. I'm not sure if presence only queries for indexed columns?
if some indexes are missing, they should be added.
-- juha
Hello,
So, should I start modifying the install scripts so that we use InnoDB engine, or is a table-lock sufficient when myisam is used? Mysql will not give an error if the engine does not support locking on individual rows. So the experience will be transparent for the end user, except for the locking of the whole table.
A table lock might be OK, but probably far less efficient than row locks. There is also the possibility of there being some deadlocks in the presence code if entire table locks are used - I can't say whether this is likely or not as I haven't taken a critical look at the code with that in mind.
Regards,
Peter
Hi,
A table lock might be OK, but probably far less efficient than row locks. There is also the possibility of there being some deadlocks in the presence code if entire table locks are used - I can't say whether this is likely or not as I haven't taken a critical look at the code with that in mind.
Ok, I have done some changes to the kamdbctl script to be able to specify table engine, so InnoDB can be used.
I have also implemented query_lock now, but I am having problems getting the presence module to actually use any of the transaction functions. It doesn't seem to use transactions for everyday queries used for my SIMPLE presence setup. Does anyone have any tips for testing the sql transaction functionality of the presence module?
I have updated the presence.xml doc. But if i regenerate the README, it changes too much because of my locale settings.
Could anyone help me test this?
http://lunatic.no/0001-Added-query_lock-support-in-db_mysql-driver-and-adde....
-- Håkon