{"id":805,"date":"2007-03-17T03:16:57","date_gmt":"2007-03-16T17:16:57","guid":{"rendered":"http:\/\/www.flamingspork.com\/blog\/2007\/03\/17\/ndb-online-add-node-progress-or-rather-testing-it\/"},"modified":"2009-02-21T13:50:41","modified_gmt":"2009-02-21T03:50:41","slug":"ndb-online-add-node-progress-or-rather-testing-it","status":"publish","type":"post","link":"https:\/\/www.flamingspork.com\/blog\/2007\/03\/17\/ndb-online-add-node-progress-or-rather-testing-it\/","title":{"rendered":"NDB Online Add Node Progress (or rather, testing it)"},"content":{"rendered":"<p>So, the sitch as of today:<\/p>\n<p>Added ndb_mgm_set_configuration() call to the mgmapi &#8211; which is not-so-casually evil API call that sends a packed ndb_mgm_configuration object (like what you get from ndb_mgm_get_configuration) to the management server, who then resets its lists of nodes for event reporting and for ClusterMgr and starts serving things out of this configuration. Notably, if a data node restarts, it gets this new configuration.<\/p>\n<p>By itself, this will let us write test programs for online configuration changes (e.g. changing DataMemory).<\/p>\n<p>I&#8217;ve also added a Disabled property to data nodes. If set, just about everywhere ignores the node.<\/p>\n<p>This allows a test program to test add\/drop node functionality &#8211; without the need for external clusterware stopping and starting processes.<\/p>\n<p>If you start with a large cluster, we can get a test program to disable some nodes and do an initial cluster restart (essentially starting a new, smaller cluster) and then add in the disabled nodes to form a larger cluster. Due to the way we do things, we actually still have the Transporters to the nodes we&#8217;re adding, which is slightly different than what happens in the real world. HOWEVER, it keeps the test program independent of any mechanism to start a node on a machine &#8211; so i don&#8217;t (for example) need to run ndb_cpcd on my laptop while testing.<\/p>\n<p>But anyway, I now have a test program, that we could run as part of autotest that will happily take a 4 node cluster, start a 2 node cluster from it and online add 2 nodes.<\/p>\n<p>Adding these new nodes into a nodegroup is currently not working with my patches though&#8230; for some reason the DBDICT transaction seems to not be going through the prepare phase&#8230; no doubt a bug in my code relating to something that&#8217;s changed in DBDICT in the past year.<\/p>\n<p>So there is progress towards having the ability to add data nodes (and node groups) to a running cluster.<\/p>\n<p>Online table re-organisation is another thing alltogether though&#8230; and no doubt some good subtle bugs to be written.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So, the sitch as of today: Added ndb_mgm_set_configuration() call to the mgmapi &#8211; which is not-so-casually evil API call that sends a packed ndb_mgm_configuration object (like what you get from ndb_mgm_get_configuration) to the management server, who then resets its lists &hellip; <a href=\"https:\/\/www.flamingspork.com\/blog\/2007\/03\/17\/ndb-online-add-node-progress-or-rather-testing-it\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[14],"tags":[628,54],"class_list":["post-805","post","type-post","status-publish","format-standard","hentry","category-mysql","tag-mysql","tag-ndb"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5a6n8-cZ","jetpack-related-posts":[{"id":798,"url":"https:\/\/www.flamingspork.com\/blog\/2007\/03\/09\/mgmapi-timeouts-and-resurrecting-the-online-add-node\/","url_meta":{"origin":805,"position":0},"title":"mgmapi timeouts and resurrecting the online add node","author":"Stewart Smith","date":"2007-03-09","format":false,"excerpt":"The other day I managed to send off what's nearly the final patches for adding proper timeout support to the MySQL Cluster management API. Jonas has had a bit of a look, found one thing I've missed, but it'll probably get in somewhere soon (probably the carrier grade edition first,\u2026","rel":"","context":"In &quot;mysql&quot;","block_context":{"text":"mysql","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/mysql\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":549,"url":"https:\/\/www.flamingspork.com\/blog\/2006\/01\/11\/bug-15695-and-ndb-initial-start\/","url_meta":{"origin":805,"position":1},"title":"Bug 15695 and NDB initial start","author":"Stewart Smith","date":"2006-01-11","format":false,"excerpt":"The process for starting up a cluster is pretty interesting. Where, of course, \"interesting\" is translated to \"complex\". There's a lot of things you have to watch out for (namely you want one cluster, not two or ten or anything). You also want to actually start a cluster, not just\u2026","rel":"","context":"In &quot;mysql&quot;","block_context":{"text":"mysql","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/mysql\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":767,"url":"https:\/\/www.flamingspork.com\/blog\/2006\/12\/11\/online-online-online-or-restarts-are-for-wusses\/","url_meta":{"origin":805,"position":2},"title":"online online online! (or restarts are for wusses)","author":"Stewart Smith","date":"2006-12-11","format":false,"excerpt":"I often see things go past my eyes where customers (and users - i.e. those that don't send wads of cash our way and hence are not financially supporting my beer, curry and photography habits) have amazing uptime and reliability requirements. When talking to businesses that use MySQL, it's not\u2026","rel":"","context":"In &quot;mysql&quot;","block_context":{"text":"mysql","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/mysql\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":800,"url":"https:\/\/www.flamingspork.com\/blog\/2007\/03\/10\/code-size-of-an-engine-versus-test-suite\/","url_meta":{"origin":805,"position":3},"title":"Code size of an engine versus test suite","author":"Stewart Smith","date":"2007-03-10","format":false,"excerpt":"If you count the lines of code in the MySQL Cluster (NDB) test suite (mysql-5.1\/storage\/ndb\/test - and exclude the old ODBC stuff) you come up with about 104000 lines of code. This is in contrast to the approximate other 350,000 lines of code for the NDB engine (excluding the handler,\u2026","rel":"","context":"In &quot;mysql&quot;","block_context":{"text":"mysql","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/mysql\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":855,"url":"https:\/\/www.flamingspork.com\/blog\/2007\/06\/27\/ndb_mgm-pr0n\/","url_meta":{"origin":805,"position":4},"title":"ndb_mgm pr0n","author":"Stewart Smith","date":"2007-06-27","format":false,"excerpt":"ndb_mgm> all report MemoryUsage Node 1: Data usage is 11%(632 32K pages of total 5440) Node 1: Index usage is 22%(578 8K pages of total 2592) Node 2: Data usage is 61%(3331 32K pages of total 5440) Node 2: Index usage is 40%(1039 8K pages of total 2592) ndb_mgm> Oh,\u2026","rel":"","context":"In &quot;mysql&quot;","block_context":{"text":"mysql","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/mysql\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":776,"url":"https:\/\/www.flamingspork.com\/blog\/2007\/01\/08\/ndb-ndb-the-storage-engine-for-me\/","url_meta":{"origin":805,"position":5},"title":"NDB! NDB! The storage engine for me!","author":"Stewart Smith","date":"2007-01-08","format":false,"excerpt":"Today I set up a mysqld connected to my not-quite-HA cluster at home here to replicate from my MythTV database into cluster. The idea behind this is to eat an increasing amount of my own dogfood around the house. To do this, I also set up the MySQL Instance Manager\u2026","rel":"","context":"In &quot;mysql&quot;","block_context":{"text":"mysql","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/mysql\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/805","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/comments?post=805"}],"version-history":[{"count":2,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/805\/revisions"}],"predecessor-version":[{"id":1518,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/805\/revisions\/1518"}],"wp:attachment":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/media?parent=805"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/categories?post=805"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/tags?post=805"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}