{"id":7632,"date":"2016-09-06T11:44:14","date_gmt":"2016-09-06T09:44:14","guid":{"rendered":"http:\/\/code.openark.org\/blog\/?p=7632"},"modified":"2016-09-06T11:44:36","modified_gmt":"2016-09-06T09:44:36","slug":"gh-ost-1-0-17-hooks-sub-second-lag-control-amazon-rds-and-more","status":"publish","type":"post","link":"https:\/\/code.openark.org\/blog\/mysql\/gh-ost-1-0-17-hooks-sub-second-lag-control-amazon-rds-and-more","title":{"rendered":"gh-ost 1.0.17: Hooks, Sub-second lag control, Amazon RDS and more"},"content":{"rendered":"<p><a href=\"https:\/\/github.com\/github\/gh-ost\">gh-ost<\/a> version <a href=\"https:\/\/github.com\/github\/gh-ost\/releases\/tag\/v1.0.17\">1.0.17<\/a> is now released, with various additions and fixes. Here are some notes of interest:<\/p>\n<h3>Hooks<\/h3>\n<p><code>gh-ost<\/code> now supports <a href=\"https:\/\/github.com\/github\/gh-ost\/blob\/master\/doc\/hooks.md\">hooks<\/a>. These are your own executables that <code>gh-ost<\/code> will invoke at particular points of interest (validation pass, about to cut-over, success, failure, status, etc.)<\/p>\n<p><code>gh-ost<\/code> will set various environment variables for your executables to pick up, passing along such information as migrated\/<em>ghost<\/em> table name, elapsed time, processed rows, migrated host etc.<\/p>\n<h3>Sub-second lag control<\/h3>\n<p>At GitHub we&#8217;re very strict about replication lag. We keep it well under <code>1<\/code> second at most times. <code>gh-ost<\/code> can now identify <a href=\"https:\/\/github.com\/github\/gh-ost\/blob\/master\/doc\/subsecond-lag.md\">sub-second lag on replicas<\/a> (well, you need to supply with the right query). Our current production migrations are set by default with <code>--max-lag-millis=500<\/code> or less, and our most intensive migrations keep replication lag well below <code>1sec<\/code> or even below <code>500ms<\/code><\/p>\n<h3>No SUPER<\/h3>\n<p>The <code>SUPER<\/code> privilege is required to <code>set global binlog_format='ROW'<\/code> and for <code>STOP SLAVE; START SLAVE;<\/code><\/p>\n<p>If you <em>know<\/em> your replica has RBR, you can pass <code>--assume-rbr<\/code> and skips those steps.<\/p>\n<h3>RDS<\/h3>\n<p>Hooks + No Super = RDS, as seems to be the case. For <code>--test-on-replica<\/code> you will need to supply your own <code>gh-ost-on-stop-replication<\/code> hook, to stop your RDS replica at cut-over phase. See <a href=\"https:\/\/github.com\/github\/gh-ost\/issues\/163#issuecomment-244694616\">this tracking issue<\/a><!--more--><\/p>\n<h3>master-master<\/h3>\n<p>While active-active are still not supported, you now have greater control over master-master topologies by being able to explicitly pick your master (as <code>gh-ost<\/code> arbitrarily picks one of the co-masters). Do so by passing <code>--assume-master-host<\/code>. See <a href=\"https:\/\/github.com\/github\/gh-ost\/blob\/master\/doc\/cheatsheet.md\">cheatsheet<\/a>.<\/p>\n<h3>tungsten replicator<\/h3>\n<p>Similarly, <code>gh-ost<\/code> cannot crawl your <code>tungsten<\/code> topology, and you are able to specify <code>--tungsten --assume-master-host=the.master.com<\/code>. See <a href=\"https:\/\/github.com\/github\/gh-ost\/blob\/master\/doc\/cheatsheet.md\">cheatsheet<\/a>.<\/p>\n<h3>Concurrent-rowcount<\/h3>\n<p><code>--exact-rowcount<\/code> is awesomeness, keeping quite accurate estimate of progress. With <code>--concurrent-rowcount<\/code> we begin migration with a rough estimate, and execute <code>select count(*) from your_table<\/code> in parallel, updating our estimate later on throughout the migration<\/p>\n<h3>Stricter, safer<\/h3>\n<p><code>gh-ost<\/code> works in <code>STRICT_ALL_TABLES<\/code> mode, meaning it would fail rather than set the wrong value to a column.<\/p>\n<p>In addition to unit-testing and production continuous test, a set of <a href=\"https:\/\/github.com\/github\/gh-ost\/blob\/master\/doc\/local-tests.md\">local tests<\/a> is growing, hopefully to run as CI tests later on.<\/p>\n<h3>Fixed problems<\/h3>\n<p>Fixed <code>time_zone<\/code> related bug, high <code>unsigned<\/code> values bug; added strict check for triggers, relaxed config file parsing, and more. Thank you to community contributors for PRs, from <code>ipv6<\/code> to typos!<\/p>\n<h3>Known issues<\/h3>\n<p>Issues coming and going at all times &#8212; thank you for reporting Issues!<\/p>\n<p>We have a confirmed <a href=\"https:\/\/github.com\/github\/gh-ost\/issues\/226\">bug with non-UTF charsets<\/a> at this time. Some other minor issues and feature requests are open &#8212; we&#8217;ll take them as we go along.<\/p>\n<h3>Feedback requests<\/h3>\n<p>We are not testing <code>gh-ost<\/code> on RDS ourselves. We appreciate community feedback on <a href=\"https:\/\/github.com\/github\/gh-ost\/issues\/163\">this tracking issue<\/a>.<\/p>\n<p>We are not testing <code>gh-ost<\/code> on Galera\/XtraDB cluster ourselves. We appreciate community feedback on <a href=\"https:\/\/github.com\/github\/gh-ost\/issues\/224\">this tracking issue<\/a>.<\/p>\n<p>We value submitted Issues and questions.<\/p>\n<h3>Speaking<\/h3>\n<p>We will be presenting <code>gh-ost<\/code> in the next month:<\/p>\n<ul>\n<li>I will be <a href=\"http:\/\/githubuniverse.com\/program\/sessions\/#gh-ost\">presenting gh-ost at GitHub Universe<\/a>, Sep. 14th<\/li>\n<li>Tom Krouper will be <a href=\"https:\/\/datalayer.com\/\">presenting gh-ost at DataLayer<\/a>, Seattle, Sep 28th<\/li>\n<li>Tom Krouper and myself will be <a href=\"https:\/\/www.percona.com\/live\/plam16\/sessions\/introducing-gh-ost-triggerless-painless-trusted-online-schema-migrations\">presenting gh-ost at PerconaLive<\/a>, Amsterdam, Oct 5th<\/li>\n<\/ul>\n<p>Hope to see you there, and thank you again to all contributors!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>gh-ost version 1.0.17 is now released, with various additions and fixes. Here are some notes of interest: Hooks gh-ost now supports hooks. These are your own executables that gh-ost will invoke at particular points of interest (validation pass, about to cut-over, success, failure, status, etc.) gh-ost will set various environment variables for your executables to [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_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":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[5],"tags":[125,89,57],"class_list":["post-7632","post","type-post","status-publish","format-standard","hentry","category-mysql","tag-gh-ost","tag-new-features","tag-open-source"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2bZZp-1Z6","_links":{"self":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts\/7632","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/comments?post=7632"}],"version-history":[{"count":7,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts\/7632\/revisions"}],"predecessor-version":[{"id":7641,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts\/7632\/revisions\/7641"}],"wp:attachment":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/media?parent=7632"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/categories?post=7632"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/tags?post=7632"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}