{"action":"created","issue":{"url":"https://api.github.com/repos/greenplum-db/gpdb/issues/4963","repository_url":"https://api.github.com/repos/greenplum-db/gpdb","labels_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/4963/labels{/name}","comments_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/4963/comments","events_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/4963/events","html_url":"https://github.com/greenplum-db/gpdb/pull/4963","id":321771971,"number":4963,"title":"[gprecoverseg rebalance] Ensure failover is complete before bringing up the mirror","user":{"login":"d","id":440892,"avatar_url":"https://avatars2.githubusercontent.com/u/440892?v=4","gravatar_id":"","url":"https://api.github.com/users/d","html_url":"https://github.com/d","followers_url":"https://api.github.com/users/d/followers","following_url":"https://api.github.com/users/d/following{/other_user}","gists_url":"https://api.github.com/users/d/gists{/gist_id}","starred_url":"https://api.github.com/users/d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d/subscriptions","organizations_url":"https://api.github.com/users/d/orgs","repos_url":"https://api.github.com/users/d/repos","events_url":"https://api.github.com/users/d/events{/privacy}","received_events_url":"https://api.github.com/users/d/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-05-10T00:43:45Z","updated_at":"2018-05-14T21:56:56Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/greenplum-db/gpdb/pulls/4963","html_url":"https://github.com/greenplum-db/gpdb/pull/4963","diff_url":"https://github.com/greenplum-db/gpdb/pull/4963.diff","patch_url":"https://github.com/greenplum-db/gpdb/pull/4963.patch"},"body":"To \"rebalance\" a primary-mirror pair, `gprecoverseg -r` performs the following steps:\r\n\r\n1. bring down the acting primary\r\n1. issue a query that triggers the failover\r\n1. bring up the mirror (`gprecoverseg -F`)\r\n\r\nCurrently these 3 steps are happening in close succession. However, there is a chance that between step 2 and step 3, the mirror promotion happens slower than we expect. The implicit assumption here is that the acting mirror has finished transitioning to the primary role before step 3 is performed.\r\n\r\nThis patch adds a retry in \"sort of step 2, definitely before step 3\", to ensure a good state before we can bring up the mirror.\r\n\r\nCo-authored-by: Jesse Zhang <sbjesse@gmail.com>\r\nCo-authored-by: David Kimura <dkimura@pivotal.io>"},"comment":{"url":"https://api.github.com/repos/greenplum-db/gpdb/issues/comments/388976056","html_url":"https://github.com/greenplum-db/gpdb/pull/4963#issuecomment-388976056","issue_url":"https://api.github.com/repos/greenplum-db/gpdb/issues/4963","id":388976056,"user":{"login":"ashwinstar","id":11396815,"avatar_url":"https://avatars2.githubusercontent.com/u/11396815?v=4","gravatar_id":"","url":"https://api.github.com/users/ashwinstar","html_url":"https://github.com/ashwinstar","followers_url":"https://api.github.com/users/ashwinstar/followers","following_url":"https://api.github.com/users/ashwinstar/following{/other_user}","gists_url":"https://api.github.com/users/ashwinstar/gists{/gist_id}","starred_url":"https://api.github.com/users/ashwinstar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashwinstar/subscriptions","organizations_url":"https://api.github.com/users/ashwinstar/orgs","repos_url":"https://api.github.com/users/ashwinstar/repos","events_url":"https://api.github.com/users/ashwinstar/events{/privacy}","received_events_url":"https://api.github.com/users/ashwinstar/received_events","type":"User","site_admin":false},"created_at":"2018-05-14T21:56:56Z","updated_at":"2018-05-14T21:56:56Z","author_association":"MEMBER","body":">> This logic is what we've lifted from the original code. This patch mostly adds the timeout logic around. If this pair decides to remove the query over gp_id, then wait_and_printdots goes away.\r\n\r\nYes, we should loose out the `gp_id` query. It makes code much cleaner as well to clearly convey `BEGIN` is testing the primaries and not really this query. Confusion which I always had earlier when looking into the code earlier.\r\n\r\n>> We also pulled out the magic number 30 into a named constant\r\n\r\nThank You, looks good.\r\n"}}
{"actor":{"display_login":"ashwinstar"}}