Bug #22163 | Load unevenly distributed on TCs | ||
---|---|---|---|
Submitted: | 9 Sep 2006 9:25 | Modified: | 16 Oct 2008 17:17 |
Reporter: | Johan Andersson | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Cluster: Cluster (NDB) storage engine | Severity: | S3 (Non-critical) |
Version: | 5.1.X | OS: | Any (*) |
Assigned to: | Frazer Clement | CPU Architecture: | Any |
Tags: | TC |
[9 Sep 2006 9:25]
Johan Andersson
[9 Sep 2006 9:35]
Johan Andersson
On 5.0, the transaction in the SPROC is always executed on one TC only: 2006-09-09 11:34:31 [MgmSrvr] INFO -- Node 2: Operations=0 2006-09-09 11:34:31 [MgmSrvr] INFO -- Node 3: Operations=108288 2006-09-09 11:34:31 [MgmSrvr] INFO -- Node 2: Trans. Count = 0, Commit Count = 0, Read Count = 0, Simple Read Count = 0, Write Count = 0, AttrInfo Count = 0, Concurrent Operations = 0, Abort Count = 0 Scans: 0 Range scans: 0 2006-09-09 11:34:32 [MgmSrvr] INFO -- Node 3: Trans. Count = 425, Commit Count = 0, Read Count = 108748, Simple Read Count = 108748, Write Count = 0, AttrInfo Count = 326244, Concurrent Operations = 0, Abort Count = 0 Scans: 0 Range scans: 423 Whereas the "normal" query is distributed correctly onto the TCs.
[26 Sep 2006 10:43]
Johan Andersson
No takers... okay, a test case: with ndb_index_stat_enable=0 and SPROC --> skew load with ndb_index_stat_enable=1 and SPROC --> evenly distributed load with ndb_index_stat_enable=0 and Prepared Statement --> evenly distributed load with ndb_index_stat_enable=1 and Prepared Statement --> skew load strange.. SPROC used: drop procedure test3; delimiter $$ create procedure test3( in name varchar(255)) begin set @stmt = concat("select t1.a,t1.b,t1.c from t1,t2 where t1.a=t2.a and t2.c='", name,"'"); # select @stmt; prepare stmt from @stmt; execute stmt; drop prepare stmt; end; $$ delimiter ; PREPARED STATEMENT USED: select t1.a,t1.b,t1.c from t1,t2 where t1.a=t2.a and t2.c=? Tables: CREATE TABLE `t1` ( `a` int(11) NOT NULL AUTO_INCREMENT, `b` int(11) DEFAULT NULL, `c` varchar(255) DEFAULT NULL, `d` char(255) DEFAULT 'tt', PRIMARY KEY (`a`) ) ENGINE=ndbcluster DEFAULT CHARSET=latin1 CREATE TABLE `t2` ( `a` int(11) NOT NULL AUTO_INCREMENT, `b` int(11) NOT NULL DEFAULT '0', `c` varchar(255) DEFAULT NULL, PRIMARY KEY (`a`,`b`), KEY `ix` (`c`) ) ENGINE=ndbcluster DEFAULT CHARSET=latin1
[16 Oct 2008 17:17]
Frazer Clement
Unsuccessfully attempted to reproduce on mysql-5.1-telco-6.2 with 2 nodes and MySQLD on localhost. Interactive Select query and stored procedure with index stats enabled and disabled all showed good balance using the TC statistics. Perhaps bug has been fixed already, or distributed configuration is required to reproduce?