diff --git a/go/vt/topotools/routing_rules.go b/go/vt/topotools/routing_rules.go index a3bc5a8a957..9056eef4283 100644 --- a/go/vt/topotools/routing_rules.go +++ b/go/vt/topotools/routing_rules.go @@ -189,6 +189,7 @@ func UpdateKeyspaceRoutingRules(ctx context.Context, ts *topo.Server, reason str if lockErr != nil { // If the key does not yet exist then let's create it. if !topo.IsErrType(lockErr, topo.NoNode) { + log.Warningf("Failed to lock keyspace routing rules: %v", lockErr) return lockErr } rules := make(map[string]string) @@ -198,7 +199,9 @@ func UpdateKeyspaceRoutingRules(ctx context.Context, ts *topo.Server, reason str // This will fail if the key already exists and thus avoids any races here. The first // writer will win and the others will have to retry. This situation should be very // rare as we are typically only updating the rules from here on out. + log.Warningf("Creating keyspace routing rules for the first time") if err := ts.CreateKeyspaceRoutingRules(ctx, buildKeyspaceRoutingRules(&rules)); err != nil { + log.Warningf("Failed to create keyspace routing rules: %v", err) return err } return nil @@ -209,6 +212,7 @@ func UpdateKeyspaceRoutingRules(ctx context.Context, ts *topo.Server, reason str return err } if err := update(lockCtx, &rules); err != nil { + log.Warningf("Failed to update keyspace routing rules: %v", err) return err } if err := saveKeyspaceRoutingRulesLocked(lockCtx, ts, rules); err != nil { diff --git a/go/vt/vtctl/workflow/utils.go b/go/vt/vtctl/workflow/utils.go index d4e8d7b4ec0..02cdd0403b8 100644 --- a/go/vt/vtctl/workflow/utils.go +++ b/go/vt/vtctl/workflow/utils.go @@ -882,7 +882,10 @@ func updateKeyspaceRoutingRules(ctx context.Context, ts *topo.Server, reason str // If we were racing with another caller to create the initial routing rules, then // we can immediately retry the operation. if !topo.IsErrType(err, topo.NodeExists) { + log.Warningf("failed to update keyspace routing rules, NOT topo.NodeExists: %v", err) return err + } else { + log.Warningf("failed to update keyspace routing rules, GOT topo.NodeExists, retrying: %v", err) } return update() }