Bug #25064 ClusterLog Wraps lines
Submitted: 14 Dec 2006 10:52 Modified: 6 Nov 2007 9:17
Reporter: Kris Buytaert (Candidate Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S4 (Feature request)
Version:5.1.12 OS:Linux (Linux)
Assigned to: Stewart Smith CPU Architecture:Any
Triage: D5 (Feature request)

[14 Dec 2006 10:52] Kris Buytaert
Description:
The output of ClusterLog is splitted over multiple lines, making it more difficult to grep for specific values based on a node.

2006-12-14 00:39:40 [MgmSrvr] INFO     -- Node 3: 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

How to repeat:
grep the cluster log file

Suggested fix:
Don't write new newlines
[18 Dec 2006 14:56] Kris Buytaert
Also,  keep the formatting consistent please .

Concurrent Operations = 0, Abort Count = 0 
etc are listed  as String  = $value
Whereas Scans: 591 Range scans: 195
 is listed as String : $value
[14 Aug 2007 4:50] Stewart Smith
Trivial fixes.

However, could this break some applications? Hartmut, you probably have a good knowledge of the scripts out there that could rely on this....
[14 Aug 2007 4:52] Stewart Smith
patch 1 - remove newlines

Attachment: bug25064_cluster_log_newlines.patch (text/x-patch), 1.48 KiB.

[14 Aug 2007 4:52] Stewart Smith
patch 2 - make format consistent

Attachment: bug25064_consistent_trans_counters_event_format.patch (text/x-patch), 763 bytes.

[25 Sep 2007 15:41] Hartmut Holzgraefe
regarding removal of newlines i don't see any issues,
all scripts that i am aware of either ignore follow up lines completely
or concatenate log lines not starting with a time stamp with the previously read line

regarding ":" vs. "=" i'm not sure whether this would confuse
existing parse code, i'd still like to see this become consistent though

at least for the log parsing stuff i wrote i'm fine with keeping things in sync with these changes
[3 Oct 2007 7:31] Stewart Smith
Hartmut is okay with this, so pushed to 5.1-ndb
[3 Oct 2007 7:35] 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/34804

ChangeSet@1.2563, 2007-10-03 17:25:46+10:00, stewart@flamingspork.com +1 -0
  [PATCH] BUG#25064 Remove newlines from cluster log
  
  Index: ndb/storage/ndb/src/common/debugger/EventLogger.cpp
  ===================================================================
[3 Oct 2007 7:35] 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/34805

ChangeSet@1.2564, 2007-10-03 17:26:03+10:00, stewart@flamingspork.com +1 -0
  [PATCH] BUG#25064 make formatting of key=value consistent in getTextTransReportCounters
  
  Index: ndb/storage/ndb/src/common/debugger/EventLogger.cpp
  ===================================================================
[10 Oct 2007 8:33] Jon Stephens
Documented bugfix in mysql-5.1.22-ndb-6.2.7 changelog; left status as PQ.
[15 Oct 2007 17:49] Jon Stephens
Also documented in mysql-5.1.22-ndb-6.3.4 changelog; left status as PQ.
[5 Nov 2007 13:53] Bugs System
Pushed into 6.0.4-alpha
[5 Nov 2007 13:56] Bugs System
Pushed into 5.1.23-rc
[6 Nov 2007 9:17] 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

Also documented in 5.1.23 and 6.0.4 changelogs. Closed.