Skip to content

Commit

Permalink
Fix UpdateOption
Browse files Browse the repository at this point in the history
Signed-off-by: MyonKeminta <MyonKeminta@users.noreply.github.com>
  • Loading branch information
MyonKeminta committed Jul 3, 2024
1 parent a41e40c commit d25a8c8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,12 @@ func (c *client) UpdateOption(option DynamicOption, value any) error {
return errors.New("[pd] invalid value type for EnableFollowerHandle option, it should be bool")
}
c.option.setEnableFollowerHandle(enable)
case TSOClientConcurrencyFactor:
value, ok := value.(int)
if !ok {
return errors.New("[pd] invalid value type for TSOClientConcurrencyFactor option, it should be int")
}
c.option.setTSOClientConcurrencyFactor(value)
default:
return errors.New("[pd] unsupported client option")
}
Expand Down
2 changes: 2 additions & 0 deletions client/tso_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,8 @@ func (h *histogram) String() string {
}

put(lastValue, lastValueCount)
lastValue = h.buckets[i]
lastValueCount = 1
}

put(lastValue, lastValueCount)
Expand Down

0 comments on commit d25a8c8

Please sign in to comment.