Last active
February 22, 2023 16:30
-
-
Save adsr/f70eb2f966d1b82c4564fa10f03fe5b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/go/vt/vttablet/tabletmanager/tm_init.go b/go/vt/vttablet/tabletmanager/tm_init.go | |
index 63e0961f86..e157842913 100644 | |
--- a/go/vt/vttablet/tabletmanager/tm_init.go | |
+++ b/go/vt/vttablet/tabletmanager/tm_init.go | |
@@ -920,8 +920,10 @@ func (tm *TabletManager) initializeReplication(ctx context.Context, tabletType t | |
// If using semi-sync, we need to enable it before connecting to primary. | |
// We should set the correct type, since it is used in replica semi-sync | |
tablet.Type = tabletType | |
- if err := tm.fixSemiSync(tabletType, convertBoolToSemiSyncAction(reparentutil.IsReplicaSemiSync(durability, currentPrimary.Tablet, tablet))); err != nil { | |
- return nil, err | |
+ if tm.isPrimarySideSemiSyncEnabled() { | |
+ if err := tm.fixSemiSync(tabletType, convertBoolToSemiSyncAction(reparentutil.IsReplicaSemiSync(durability, currentPrimary.Tablet, tablet))); err != nil { | |
+ return nil, err | |
+ } | |
} | |
// Set primary and start replication. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment