[OpenSER-Devel] [ openser-Patches-1663611 ] Multithreading support for mysql module

SourceForge.net noreply at sourceforge.net
Fri Oct 12 16:01:45 CEST 2007


Patches item #1663611, was opened at 2007-02-19 16:04
Message generated for change (Comment added) made by henningw
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=1663611&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: ver devel
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Henning Westerholt (henningw)
Assigned to: Nobody/Anonymous (nobody)
Summary: Multithreading support for mysql module

Initial Comment:
The attached patch adds multithreading functionality based on the posix threads library to the mysql module. We're using this module (in an older version) with 0.9.5 to better support database failover scenarios. As the porting to current cvs demanded heavy adaptions, this code is rather untested now. This is probably not the right think to use in a production environment for now.. Any suggestions and bug reports are welcome!

This patch adds two new files for the threading functions to the mysql module and should cleanly apply to cvs head. It starts a master and a worker thread. 
If the worker hang due problems with the database, the master tries to restart the worker after a configurable timeout value. 
Compile with "EXTRA_DEBUG" to activate more locking checks and debugging output. You need a thread-safe mysql library to use this patch, otherwise the module will not start.



----------------------------------------------------------------------

>Comment By: Henning Westerholt (henningw)
Date: 2007-10-12 14:01

Message:
Logged In: YES 
user_id=337916
Originator: YES

In the patch here available are still some bugs present, with some glibc
versions it don't work at all.

I will not update this patch anymore as the usage of threads is apparently
a blocker for inclusion into the trunk.

Cheers,

Henning

----------------------------------------------------------------------

Comment By: Henning Westerholt (henningw)
Date: 2007-04-18 08:58

Message:
Logged In: YES 
user_id=337916
Originator: YES

* add missing CMD switch case for fetch_result
  add recently introduced last_inserted_id function
* check and start thread if necessary in exec_cmd to 
  fix problem during openser startup process - 
  db_init get called before thread_init
* link against the multithreading mysql lib
File Added: mysql-mt.patch

----------------------------------------------------------------------

Comment By: Henning Westerholt (henningw)
Date: 2007-02-26 17:32

Message:
Logged In: YES 
user_id=337916
Originator: YES

I updated the patch and fixed some errors. I add the "fetch_result"
function 
that was missing. Now it is also possible to disable all the
multithreading stuff
with an simple #define to use the normal behaviour.
File Added: mysql-mt.patch

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743022&aid=1663611&group_id=139143



More information about the Devel mailing list