Bug #9341 do not lock tables for reading
Submitted: 22 Mar 2005 16:29 Modified: 12 May 2005 12:15
Reporter: missy hogan Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:4.1.9 OS:Linux (Redhat)
Assigned to: Assigned Account CPU Architecture:Any

[22 Mar 2005 16:29] missy hogan
Description:
I have 4 servers running MySQL Cluster. All of them are the data nodes as well as the API nodes. One of the servers is also housing the management node. We have a load balancer sitting in front of the servers to spread the requests to the individual APIs so we only have one IP address our client software uses.

When we attempt to query the database with a SELECT command, it works successfully when only one client tries to connect.  However, if we try the a query on the same table with another client we get a 'Lock wait timeout exceeded' error.  The commands will also only run for maybe half a second before returning the error.

How to repeat:
run several client programs looping something simular to below

while (true)
{
    MySql.Data.MySqlClient.Scalor("SELECT COUNT(*) FROM TableName");
}

Suggested fix:
Do not lock tables when reading
[12 Apr 2005 12:15] Jonas Oreland
Hi,

Are the clients connecting to the same mysqld or different ones?

Regardless, "select count(*) from T"should be running totally wo/ locks.
Actually "select * from T" should run wo/ locks.

Can you reproduce this using "mysql"?
What kind of middleware are you using? perl, dbd dbi java?

/Jonas
[12 May 2005 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".