Bug #18538 Graceful node stop can abort transactions
Submitted: 27 Mar 2006 10:56 Modified: 27 Aug 2010 7:59
Reporter: Serge Kozlov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:mysql-4.1 OS:Linux (FC4)
Assigned to: Jonas Oreland CPU Architecture:Any

[27 Mar 2006 10:56] Serge Kozlov
Description:
Try to restart same node when load_tpcb.pl loads a data.
Error:
DBD::mysql::st execute failed: Got temporary error 286 'Node failure caused abort of transaction' from NDBCLUSTER at ./load_tpcb.pl line 400.
insert into account Error: Got temporary error 286 'Node failure caused abort of
 transaction' from NDBCLUSTER at ./load_tpcb.pl line 400.

How to repeat:
1. Start cluster witj 2 replicas and 2 ndbd nodes
2. Run ndb_mgm
3. Run ./load_tpcb.pl ndb16 3306 root BLANK ndb
4. Wait while 'Loading accounts table' will appear.
5. Now try restart same ndbd node several times (through RESTART command)
6. Sometimes the error described above appears.
[28 Mar 2006 16:18] Jonas Oreland
Getting aborted transaction when a node fails is expected.
However "X restart" from ndb_mgm should _not_ give any 
  aborted transactions.

There is a know bug here, that you sometimes get 4028, but I never seen 286.

Did you do "X restart" or did you kill nodes by some other means?
[28 Mar 2006 16:47] Serge Kozlov
1. I did 'X restart'
2. Is it correct behaviour for 2 replicas?
[24 Apr 2006 19:39] Tomas Ulin
can you turn on the 'slow log'?  To see if the application has long running transactions.

if transactions are running for a long time they will be aborted even if you are running a "graceful shutdown"
[21 May 2006 17:24] Jonas Oreland
Nobody has complained about this.
(that transaction can be aborted even if graceful shutdown)
[22 Jan 2007 22:19] Jonathan Miller
Serge,

Tomas is asking for some feedback. See above.

/jeb
[23 Feb 2007 0: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".
[26 Aug 2010 9:03] 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/116837

3264 Jonas Oreland	2010-08-26
      ndb - bug#55641 - fix suma wrt. graceful shutdown, bug#18538 graceful shutdown can abort transactions
[26 Aug 2010 12:46] Bugs System
Pushed into mysql-5.1-telco-6.3 5.1.47-ndb-6.3.37 (revid:jonas@mysql.com-20100826123701-s6etvy71vidlaxme) (version source revid:jonas@mysql.com-20100826090051-denyt588wm3stmoh) (merge vers: 5.1.47-ndb-6.3.37) (pib:21)
[26 Aug 2010 12:46] Bugs System
Pushed into mysql-5.1-telco-7.0 5.1.47-ndb-7.0.18 (revid:jonas@mysql.com-20100826124130-kuw81qy5le9lpl7o) (version source revid:jonas@mysql.com-20100826123333-adf4ctppycqvjgg4) (merge vers: 5.1.47-ndb-7.0.18) (pib:21)
[26 Aug 2010 12:56] Jonas Oreland
pushed into 6.3.37, 7.0.18 and 7.1.7
[27 Aug 2010 7:59] Jon Stephens
Documented bugfix in the NDB-6.3.37, 7.0.18, and 7.1.7 changelogs, as follows:

      The planned shutdown of a data node could sometimes cause 
      transactions to be aborted unnecessarily.

Closed.