Bug #43752 ndb: spurious event operation ref count mismatch during nodre restart
Submitted: 19 Mar 2009 16:49 Modified: 20 Mar 2009 9:53
Reporter: Tomas Ulin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Replication Severity:S3 (Non-critical)
Version:cluster 6.3 OS:Any
Assigned to: Tomas Ulin CPU Architecture:Any

[19 Mar 2009 16:49] Tomas Ulin
Description:
When creating/altering table an ndb event operation is created in the mysqld to monitor the table changes for subsequent logging in the binlog.  If create/alter happens during node restart there is a chance that the reference count on the event operation may be wrong.  In debug compile this results in an assert in the ndbapi.

How to repeat:
test_event -n SubscribeNR t1
[19 Mar 2009 16:51] 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/69846

2908 Tomas Ulin	2009-03-19
      Bug #43752  ndb: spurious event operation ref count mismatch during node restart.  Rewrite refcounting code to use gci numbers to determine when an event operation object can be dropped
      modified:
        storage/ndb/include/kernel/signaldata/SumaImpl.hpp
        storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
        storage/ndb/src/kernel/blocks/suma/Suma.cpp
        storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
        storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
        storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp
        storage/ndb/test/ndbapi/test_event.cpp
[19 Mar 2009 16:52] Bugs System
Pushed into 5.1.32-ndb-6.3.24 (revid:tomas.ulin@sun.com-20090319165119-a78hjcd8n3nkqx0s) (version source revid:tomas.ulin@sun.com-20090319165056-3t0mu59npkvvtk6d) (merge vers: 5.1.32-ndb-6.3.24) (pib:6)
[20 Mar 2009 8:44] Bugs System
Pushed into 5.1.32-ndb-7.0.5 (revid:jonas@mysql.com-20090320083640-42c4bviok9ovglwd) (version source revid:jonas@mysql.com-20090320083640-42c4bviok9ovglwd) (merge vers: 5.1.32-ndb-7.0.5) (pib:6)
[20 Mar 2009 8:47] Jonas Oreland
P2 mainly due to autotest failure and code cleanup
otherwise P3/P4
[20 Mar 2009 9:53] Jon Stephens
Documented in the NDB-6.3.24 and 7.0.5 changelogs as follows:

        When creating or altering a table an NdbEventOperation is
        created in the mysqld to monitor the table for subsequent
        logging in the binlog. If this happened happens during a node
        restart there was a chance that the reference count on this event
        operation object could be incorrect, which could lead to an 
        assert in debug MySQL Cluster builds.