From b94f9b74054a611c4dd1d35a89f8d853346b713f Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Mon, 16 Oct 2023 14:26:29 -0700 Subject: [PATCH] add debugging --- go/vt/vttablet/tabletmanager/rpc_replication.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/go/vt/vttablet/tabletmanager/rpc_replication.go b/go/vt/vttablet/tabletmanager/rpc_replication.go index 7f15a3cf26e..0ed969c4ae4 100644 --- a/go/vt/vttablet/tabletmanager/rpc_replication.go +++ b/go/vt/vttablet/tabletmanager/rpc_replication.go @@ -476,10 +476,10 @@ func (tm *TabletManager) InitReplica(ctx context.Context, parent *topodatapb.Tab // // It attemps to idempotently ensure the following guarantees upon returning // successfully: -// * No future writes will be accepted. -// * No writes are in-flight. -// * MySQL is in read-only mode. -// * Semi-sync settings are consistent with a REPLICA tablet. +// - No future writes will be accepted. +// - No writes are in-flight. +// - MySQL is in read-only mode. +// - Semi-sync settings are consistent with a REPLICA tablet. // // If necessary, it waits for all in-flight writes to complete or time out. // @@ -705,6 +705,7 @@ func (tm *TabletManager) setReplicationSourceRepairReplication(ctx context.Conte ctx, unlock, lockErr := tm.TopoServer.LockShard(ctx, parent.Tablet.GetKeyspace(), parent.Tablet.GetShard(), fmt.Sprintf("repairReplication to %v as parent)", topoproto.TabletAliasString(parentAlias))) if lockErr != nil { + log.Warningf("slack: failed to lock the shard with the error: %v", lockErr) return lockErr }