Skip to content

Commit aa5b0e9

Browse files
ti-chi-botnolouchrleungx
authored
client: only report error when EnableTSOFollowerProxy is true in ms mode (#9130) (#9803)
close #9129 Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io> Signed-off-by: nolouch <nolouch@gmail.com> Signed-off-by: Ryan Leung <rleungx@gmail.com> Co-authored-by: ShuNing <nolouch@gmail.com> Co-authored-by: nolouch <nolouch@gmail.com> Co-authored-by: Ryan Leung <rleungx@gmail.com>
1 parent 0557634 commit aa5b0e9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

client/client.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -640,13 +640,13 @@ func (c *client) UpdateOption(option DynamicOption, value any) error {
640640
return err
641641
}
642642
case EnableTSOFollowerProxy:
643-
if c.getServiceMode() != pdpb.ServiceMode_PD_SVC_MODE {
644-
return errors.New("[pd] tso follower proxy is only supported in PD service mode")
645-
}
646643
enable, ok := value.(bool)
647644
if !ok {
648645
return errors.New("[pd] invalid value type for EnableTSOFollowerProxy option, it should be bool")
649646
}
647+
if c.getServiceMode() != pdpb.ServiceMode_PD_SVC_MODE && enable {
648+
return errors.New("[pd] tso follower proxy is only supported in PD service mode")
649+
}
650650
c.option.setEnableTSOFollowerProxy(enable)
651651
case EnableFollowerHandle:
652652
enable, ok := value.(bool)

0 commit comments

Comments
 (0)