-
Notifications
You must be signed in to change notification settings - Fork 100
PBM-1547 Spike PoC for control collection rs #1167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
@@ -65,7 +66,7 @@ func runConfig( | |||
var o confVals | |||
rsnc := false | |||
for k, v := range c.set { | |||
err := config.SetConfigVar(ctx, conn, k, v) | |||
err := config.SetConfigVar(ctx, ccrsConn, k, v) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is silent but critical bug up in the stack, when PBM fetches cluster time of CCRS, instead of target cluster:
percona-backup-mongodb/pbm/config/config.go
Line 617 in 1e9489c
ct, err := topo.GetClusterTime(ctx, m) |
m *restore.RestoreMeta, | ||
node string, | ||
status defs.Status, | ||
tskew int64, | ||
) error { | ||
ep, _ := config.GetEpoch(ctx, conn) | ||
ep, _ := config.GetEpoch(ctx, ccrsConn) | ||
l := log.FromContext(ctx). | ||
NewEvent(string(ctrl.CmdRestore), m.Backup, m.OPID, ep.TS()) | ||
stg, err := util.GetStorage(ctx, conn, node, l) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be CCRS connection
m *restore.RestoreMeta, | ||
node string, | ||
status defs.Status, | ||
tskew int64, | ||
) error { | ||
ep, _ := config.GetEpoch(ctx, conn) | ||
ep, _ := config.GetEpoch(ctx, ccrsConn) | ||
l := log.FromContext(ctx). | ||
NewEvent(string(ctrl.CmdRestore), m.Backup, m.OPID, ep.TS()) | ||
stg, err := util.GetStorage(ctx, conn, node, l) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also this one should use ccrs connection:
percona-backup-mongodb/cmd/pbm/restore.go
Line 271 in 1e9489c
rmeta, err = getMeta(ctx, conn, m.Name) |
This PR serves as a prototype for porting the control collection to a separate mongo instance. A new
ccrsUri
parameter for pbm-agent and pbm has been added and as result Control collection data is stored only in CCRS. This parameter is optional and if omitted pbm reuses lead conn.In some functions additional parameter for ccrsConn has been added when both conns were needed.
The remaining part of Spike will be presented in slides: [url to slides] - wip