Bug #47036 Reload of config shows only diff of last changed parameter
Submitted: 1 Sep 2009 8:19 Modified: 29 Sep 2009 4:14
Reporter: Geert Vanderkelen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:mysql-5.1-telco-7.0 OS:Any
Assigned to: Magnus Blåudd CPU Architecture:Any
Tags: config, mysql-5.1.35-ndb-7.0.7, ndb_mgmd

[1 Sep 2009 8:19] Geert Vanderkelen
Description:
When reloading the configuration of ndb_mgmd, the logs will only show the last changed parameter.

(see How to repeat for example)

How to repeat:
Changing: DataMemory and IndexMemory

Doing:
shell> ndb_mgmd -f config.ini --reload --configdir=/somewhere/

2009-09-01 10:12:53 [MgmSrvr] INFO     -- Detected change of config.ini on disk, will try to set it 
when all ndb_mgmd(s) started. This is the actual diff:
[ndbd(DB)]
NodeId=3
-IndexMemory=20971520
+IndexMemory=31457280

[ndbd(DB)]
NodeId=4
-IndexMemory=20971520
+IndexMemory=31457280
[1 Sep 2009 8:19] Geert Vanderkelen
Verified using MySQL Cluster 7.0.7
[18 Sep 2009 15:50] Geert Vanderkelen
Just to reassure people: changing two or more parameters works when doing a --reload. The problem in this bug is merely the 'diff' output in the logs showing only the last changed.

So if you change both Data and IndexMemory options, before you had:
Node 3: Data usage is 0%(22 32K pages of total 64000)
Node 3: Index usage is 0%(16 8K pages of total 51232)
Node 4: Data usage is 0%(22 32K pages of total 64000)
Node 4: Index usage is 0%(16 8K pages of total 51232)

.. and after reload you have:
Node 3: Data usage is 0%(28 32K pages of total 67200)
Node 3: Index usage is 0%(16 8K pages of total 64032)
Node 4: Data usage is 0%(28 32K pages of total 67200)
Node 4: Index usage is 0%(16 8K pages of total 64032)

So they both changed.
[24 Sep 2009 9:46] Magnus Blåudd
Wrote a patch that fixes the problem, added testcase to testConfig.cpp. Converted testConfig.cpp  to be compiled as MgmConfig-t and run as unit test.
[25 Sep 2009 8: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/84588
[28 Sep 2009 12:31] Magnus Blåudd
Pushed to 7.0 and 7.1
[29 Sep 2009 4:14] Jon Stephens
Documented bugfix on the NDB-7.0.8 changelog as follows:

        When reloading the management server configuration, only the
        last changed parameter was logged.

Closed.
[30 Sep 2009 8:14] Bugs System
Pushed into 5.1.37-ndb-7.0.9 (revid:jonas@mysql.com-20090930075942-1q6asjcp0gaeynmj) (version source revid:magnus.blaudd@sun.com-20090925104247-ozlmf4vu1f3936am) (merge vers: 5.1.37-ndb-7.0.8) (pib:11)
[30 Sep 2009 8:15] Bugs System
Pushed into 5.1.35-ndb-7.1.0 (revid:jonas@mysql.com-20090930080049-1c8a8cio9qgvhq35) (version source revid:jonas@mysql.com-20090925143824-3i5kcvsf8v3yf79j) (merge vers: 5.1.35-ndb-7.1.0) (pib:11)