diff options
author | Machiavelli <none@none> | 2010-12-04 21:50:36 +0100 |
---|---|---|
committer | Machiavelli <none@none> | 2010-12-04 21:50:36 +0100 |
commit | f5d6319d4ddd35a9be9ea886aa119465360e397e (patch) | |
tree | 5bd50f42122443fd93e81d40e07adbc2f589a21b /src/server/shared/Database/MySQLConnection.cpp | |
parent | b8bf37264b4a947e66fe29b29eb9b60ebe3d6f3c (diff) |
Core/DBLayer:
- Make the mysql connectionpool shared for async and syncrhonous connections.
- Allow configurable amount of connections for the pool
- Allow configurable amount of delaythreads
Note that delaythreads now only represent in-core threads. Whenever they execute a task they will pick a free connection from the pool instead of using their previously unique assigned connection.
The purpose of this design change is better distribution of SQL requests (no bottlenecks paired with idling) among available resources.
This also prevents a ¨memory waste¨ of preparing async prepared statements on synchronous connections (that were never called) - and vice versa. Now, connections aren´t explicitly async or synchronous, they serve both purposes.
Use at own risk, might cause instabilities.
Don´t forget to update your config files and clear your cmake cache.
--HG--
branch : trunk
Diffstat (limited to 'src/server/shared/Database/MySQLConnection.cpp')
-rwxr-xr-x | src/server/shared/Database/MySQLConnection.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/server/shared/Database/MySQLConnection.cpp b/src/server/shared/Database/MySQLConnection.cpp index 20c614b5333..de05ee311db 100755 --- a/src/server/shared/Database/MySQLConnection.cpp +++ b/src/server/shared/Database/MySQLConnection.cpp @@ -34,20 +34,11 @@ MySQLConnection::MySQLConnection(MySQLConnectionInfo& connInfo) : m_queue(NULL), -m_worker(NULL), m_Mysql(NULL), m_connectionInfo(connInfo) { } -MySQLConnection::MySQLConnection(ACE_Activation_Queue* queue, MySQLConnectionInfo& connInfo) : -m_queue(queue), -m_Mysql(NULL), -m_connectionInfo(connInfo) -{ - m_worker = new DatabaseWorker(m_queue, this); -} - MySQLConnection::~MySQLConnection() { ASSERT (m_Mysql); /// MySQL context must be present at this point |