Bug #39549 Incorrect handled resource shortage of TC::scanfragreq causing node failure
Submitted: 19 Sep 2008 21:34 Modified: 20 Sep 2008 12:31
Reporter: Jonas Oreland Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:* OS:Any
Assigned to: Jonas Oreland CPU Architecture:Any

[19 Sep 2008 21:34] Jonas Oreland
Description:
If setting a low value of MaxNoOfLocalScans and performing lots of (certain) scans. TC could run out of scanfragrecords, and incorrectly crash instead of
returning an appropriate error code

How to repeat:
MaxNoOfLocalScan=32
2-node cluster
table with 10000 rows,
perform 100 parallel "select * from t1 where a > 9997 order by a for update"
in endless loop

Suggested fix:
I introduced a new error code 291,
with the error message
"Out of scanfrag records in TC (increase MaxNoOfLocalScans)
[19 Sep 2008 21:46] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/54376

2669 Jonas Oreland	2008-09-19
      ndb - bug#39549 - incorrectly handled resource shortage in TC::scanfragrec
[19 Sep 2008 22:08] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/54381

2669 Jonas Oreland	2008-09-19
      ndb - bug#39549 - incorrectly handled resource shortage in TC::scanfragrec
[19 Sep 2008 22:16] Jonas Oreland
pushed to 62 63 and 64
[20 Sep 2008 12:31] Jon Stephens
Documented in the NDB 6.2.16 and 6.3.18 changelogs as follows:

        Setting a low value of MaxNoOfLocalScans (< 100) and performing a
        large number of (certain) scans could cause the Transaction Coordinator
        to run out of scan fragment records, and then crash. Now when this
        resource is exhausted, the cluster returns Error 291 (Out of scanfrag
        records in TC (increase MaxNoOfLocalScans)) instead.
[25 Sep 2008 10:57] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/54511

2671 Jonas Oreland	2008-09-25
      ndb - atrt
        fix replication in 6.0
        allow configurations wo/ cluster
[12 Dec 2008 23:28] Bugs System
Pushed into 6.0.7-alpha  (revid:jonas@mysql.com-20080919214900-cjrhehof2t2pjsnf) (version source revid:jonas@mysql.com-20080925105539-wd6gbofp5alv9j93) (pib:5)