Bug #27640 backup id not displayed in the output of "ndb_mgm start backup wait completed"
Submitted: 4 Apr 2007 8:56 Modified: 19 Jun 2007 12:38
Reporter: K K George Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:5.0.38 OS:Linux
Assigned to: justin he CPU Architecture:Any
Tags: Backup, NDB_MGM

[4 Apr 2007 8:56] K K George
Description:
In 5.0.27 when I execute ndb_mgm -e "start backup wait completed", the backup id is displayed. 

But the same command in 5.0.37 does not output the backup id. 

I think the bug #24544 deals with this same issue but for 5.1.12. 

I am opening this as a new bug since 24544 is closed.

How to repeat:
In 5.0.27 when I execute ndb_mgm -e "start backup wait completed", the backup id is displayed. 

# rpm -qa|grep ndb-tools
MySQL-ndb-tools-5.0.27-0.glibc23
#

# ndb_mgm --ndb-connectstring mgmtnode -e "start backup wait completed"
Connected to Management Server at: mgmtnode:1186
Waiting for completed, this may take several minutes
Node 2: Backup 13 started from node 1
Node 2: Backup 13 started from node 1 completed
 StartGCP: 19929 StopGCP: 19932
 #Records: 2050 #LogRecords: 0
 Data: 32880 bytes Log: 0 bytes

BTW in 5.1.16 also, the above output is given.

But when I run the same in 5.0.37, no backup id is displayed.

# rpm -qa|grep ndb-tools
MySQL-ndb-tools-5.0.37-0.glibc23
#

# ndb_mgm --ndb-connectstring mgmtnode -e "start backup wait completed"
Connected to Management Server at: mgmtnode:1186
Waiting for completed, this may take several minutes

Suggested fix:

It will be good if the output is made consistent to the output of the same command in 5.0.27 and 5.1.16.
[4 Apr 2007 22:55] Adam Dixon
Verified differences in behavior (output).
Version 5.0.38 vs 5.1.18

--mysql 5.0 outputs--
[mysql-ndb-50]# bin/ndb_mgm -e "start backup wait completed"
Connected to Management Server at: localhost:1186
Waiting for completed, this may take several minutes

[mysql-ndb-50]# bin/ndb_mgm -e "start backup"
Connected to Management Server at: localhost:1186
Waiting for completed, this may take several minutes

bin/ndb_mgm
ndb_mgm> start backup wait completed
Waiting for completed, this may take several minutes
Node 2: Backup 2 started from node 1
Node 2: Backup 2 started from node 1 completed
 StartGCP: 20 StopGCP: 23
 #Records: 2050 #LogRecords: 0
 Data: 32880 bytes Log: 0 bytes

--mysql 5.1 output--
[mysql-ndb-51]# bin/ndb_mgm -e "start backup wait completed"
Connected to Management Server at: localhost:1186
Waiting for completed, this may take several minutes
Node 2: Backup 1 started from node 1
<PING>
Node 2: Backup 1 started from node 1 completed
 StartGCP: 12 StopGCP: 15
 #Records: 2050 #LogRecords: 0
 Data: 32880 bytes Log: 0 bytes
<PING>
[5 Apr 2007 11:25] Tomas Ulin
Analyses:

current bitkeeper 5.0:

ndb_mgm -e "start backup wait completed"
Connected to Management Server at: localhost:1186
Waiting for completed, this may take several minutes
>>>>>>>>>>> BUG NO 1, we should see the printouts...

ndb_mgm > start backup wait completed
Connected to Management Server at: localhost:1186
Waiting for completed, this may take several minutes
Node 1: Backup 2 started from node 3
Node 1: Backup 2 started from node 3 completed
 StartGCP: 23 StopGCP: 26
 #Records: 2050 #LogRecords: 0
 Data: 32880 bytes Log: 0 bytes
>>>>>>>>>>>>>> OK

on current 5.1 bitkeeper:

ndb_mgm -e "start backup wait completed"
Connected to Management Server at: localhost:1186
Waiting for completed, this may take several minutes
<PING>
Node 1: Backup 1 started from node 3
<PING>
<PING>
<PING>
Node 1: Backup 1 started from node 3 completed
 StartGCP: 8 StopGCP: 11
 #Records: 2050 #LogRecords: 0
 Data: 32880 bytes Log: 0 bytes
>>>>>>>>>> BUG NO 2 the <PING> should not be printed...

ndb_mgm> start backup
Connected to Management Server at: localhost:1186
Waiting for completed, this may take several minutes
Node 1: Backup 2 started from node 3
Node 1: Backup 2 started from node 3 completed
 StartGCP: 23 StopGCP: 26
 #Records: 2050 #LogRecords: 0
 Data: 32880 bytes Log: 0 bytes
>>>>>>>>>>> OK

Note:  The "correct" way to check what is going on with backup is to use the mgmapi and the log events, and wait for backup events.  Parsing these printouts should be a last option.

Best regards,

Tomas Ulin
[11 Apr 2007 6:28] 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/24251

ChangeSet@1.2479, 2007-04-11 14:19:44+08:00, Justin.He@dev3-240.dev.cn.tlan +4 -0
  Bug#27640, backup id not displayed in the output of "ndb_mgm start backup wait completed"
  this patch is only valid for 5.0 because 5.1 already fixed the issue
[11 Apr 2007 8:30] 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/24257

ChangeSet@1.2479, 2007-04-11 16:20:38+08:00, Justin.He@dev3-240.dev.cn.tlan +4 -0
  Bug#27640, backup id not displayed in the output of "ndb_mgm start backup wait completed"
  this patch is only valid for 5.0 because 5.1 already fixed the issue
[11 Apr 2007 8:41] 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/24260

ChangeSet@1.2552, 2007-04-11 16:32:50+08:00, Justin.He@dev3-240.dev.cn.tlan +1 -0
  Bug#27640, Backup id not displayed in the output of "ndb_mgm start backup wait completed"
  this patch is for 5.1 only
[24 Apr 2007 18:20] Stewart Smith
for second issue "<PING>", why "<PING>" is displayed in 5.1 and not in 5.0?
> reasons:
> (1) in 5.1.18-beta, at mgmsrv/MgmtSrvr.cpp, in MgmtSrvr::logLevelThreadRun(),
> there is a new adding compare to 5.0,
>   ...
>   if(!ERROR_INSERTED(10000))
>     m_event_listner.check_listeners(); //this will cause output <PING> in 5.1
>   ...
>  
>  if remove this two sentences, 5.1 won't display "<PING>" for both interactive
> and command-line
> 
This is needed for mgmapi event timeouts to work. removing this will even cause testMgm autotest to fail :)

(2) both in 5.0.38 and 5.1.18-beta
> at mgmsrv/Services.cpp, in Ndb_mgmd_event_service::add_listener(const
> Event_listener& client),
>   ...
>   check_listeners();
>   m_clients.push_back(client);
>   ...
> check_listeners() is before push_back, so when there's one mgmclient connected
> to mgmserver, out.println("<PING>" won't execute in
> Ndb_mgmd_event_service::check_listeners() function, that's why 5.0 doesn't
> display <PING>. If let push_back run in advance of check_listeners(), 5.0 also
> display <PING>
> 
5.0 behaviour is technically buggy... connections are only really checked when new connections are made.... my 5.1 patch fixes this (for timeouts)

(3) in 5.0.38, when we run two ndb_mgm -e, it also display "<PING>"
> e.g.
> ndb_mgm -e "start backup" & ndb_mgm -e "start backup" &
> this run two backup simultaneously, it also display "<PING>", although this
> manner looks like a limitation
> 
it's part of the protocol.

(4) Since it seems output "<PING>" is necessary in mgmsrv, so we should filter
> it at mgm client when receive event report.
> Why 5.0 doesnot display "<PING>", it seems a "luck".
> 
yes, event listeners should filter out <PING> and not display.

I think this patch needs a bunch of cleanup before next phase of review - we should probably try to use structured events here as well
[9 May 2007 1:16] Miguel Solorzano
Bug: http://bugs.mysql.com/bug.php?id=28067 was marked as duplicate
of this one.
[4 Jun 2007 9:18] 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/28030

ChangeSet@1.2476, 2007-06-04 17:01:59+08:00, Justin.He@dev3-240.dev.cn.tlan +2 -0
  Bug #27640 backup id not displayed in the output of "ndb_mgm start backup wait completed"
[5 Jun 2007 6:49] 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/28107

ChangeSet@1.2476, 2007-06-05 14:39:14+08:00, Justin.He@dev3-240.dev.cn.tlan +2 -0
  Bug #27640 backup id not displayed in the output of "ndb_mgm start backup wait completed"
[14 Jun 2007 12:36] 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/28746

ChangeSet@1.2546, 2007-06-14 20:25:45+08:00, Justin.He@dev3-240.dev.cn.tlan +1 -0
  Bug#27640, backup id not dispalyed in the output of "ndb_mgm start backup wait completed"
  correct related sourcecode after merge from 5.0
[14 Jun 2007 13:02] 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/28753

ChangeSet@1.2409, 2007-06-14 19:36:47+08:00, Justin.He@dev3-240.dev.cn.tlan +3 -0
  Bug#27640, backup id not displayed in the output of "ndb_mgm start backup wait completed"
[14 Jun 2007 13:02] 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/28754

ChangeSet@1.2409, 2007-06-14 19:40:44+08:00, Justin.He@dev3-240.dev.cn.tlan +5 -0
  Bug#27640, backup id not displayed in the output of "ndb_mgm start backup wait completed"
[14 Jun 2007 16:40] 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/28785

ChangeSet@1.2511, 2007-06-14 18:40:32+02:00, tomas@whalegate.ndb.mysql.com +3 -0
  Bug #27640 backup id not displayed in the output of "ndb_mgm start backup wait completed"
  - correction, missing node id
[17 Jun 2007 17:26] 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/28946

ChangeSet@1.2512, 2007-06-17 19:27:20+02:00, tomas@whalegate.ndb.mysql.com +2 -0
  BUG#27640
  - correct test and result file
[18 Jun 2007 7:49] Bugs System
Pushed into 5.1.20-beta
[18 Jun 2007 7:50] Bugs System
Pushed into 5.0.44
[19 Jun 2007 10:21] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Documented bugfix in 5.0.44 and 5.1.20 changelogs.
[19 Jun 2007 10:26] Daniel Fischer
Didn't make it into 5.0.44, will be in 5.0.46.
[19 Jun 2007 12:38] Jon Stephens
Moved 5.0.44 changelog entry to 5.0.46 changelog.
[3 Jul 2007 4:40] Jon Stephens
Also documented for telco-6.2.23 release.