PlannedReparent: create a new context for calling UndoDemoteMaster#5841
PlannedReparent: create a new context for calling UndoDemoteMaster#5841deepthi merged 1 commit intovitessio:masterfrom
Conversation
@deepthi could you clarify this? This is not obvious to me. I think if you pass a fresh context to |
|
52220e1 to
1127303
Compare
…oteMaster Signed-off-by: deepthi <deepthi@planetscale.com>
1127303 to
056b18f
Compare
…undo PlannedReparent: create a new context for calling UndoDemoteMaster
If the calling context for PRS expires during the time that PRS is running and we have already demoted the old master, we attempt to undo the demotion.
There's clearly a bug in https://github.com/vitessio/vitess/blob/master/go/vt/wrangler/reparent.go#L609:
We are using the original context to call
UndoDemoteMaster(or rather as the base for a new context) and we don't know if that context is valid any longer.We can fix this by using the background context to call
UndoDemoteMaster.cc @zmagg
Signed-off-by: deepthi deepthi@planetscale.com