Ensure failover is complete before bringing up the mirror (#4963)
To "rebalance" a primary-mirror pair, gprecoverseg -r performs the following steps: 1. bring down the acting primary 2. issue a query that triggers the failover 3. bring up the mirror (gprecoverseg -F) Currently 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. This 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. Co-authored-by: Jesse Zhang sbjesse@gmail.com Co-authored-by: David Kimura dkimura@pivotal.io
Showing
想要评论请 注册 或 登录