Merge pull request #13416 from chaochn47/autoSync_benchmark

add autoSync flag in benchmark tool
This commit is contained in:
Sam Batschelet 2021-10-16 10:57:43 -04:00 committed by GitHub
commit c72947d87f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 3 deletions

View File

@ -25,6 +25,10 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0...v3.5.1) and
- Endpoints self identify now as `etcd-endpoints://{id}/{authority}` where authority is based on first endpoint passed, for example `etcd-endpoints://0xc0009d8540/localhost:2079` - Endpoints self identify now as `etcd-endpoints://{id}/{authority}` where authority is based on first endpoint passed, for example `etcd-endpoints://0xc0009d8540/localhost:2079`
### tools/benchmark
- [Add etcd client autoSync flag](https://github.com/etcd-io/etcd/pull/13416)
### Other ### Other
- Updated [base image](https://github.com/etcd-io/etcd/pull/13386) from `debian:buster-v1.4.0` to `debian:bullseye-20210927` to fix the following critical CVEs: - Updated [base image](https://github.com/etcd-io/etcd/pull/13386) from `debian:buster-v1.4.0` to `debian:bullseye-20210927` to fix the following critical CVEs:

View File

@ -54,6 +54,7 @@ var (
dialTimeout time.Duration dialTimeout time.Duration
targetLeader bool targetLeader bool
autoSyncInterval time.Duration
) )
func init() { func init() {
@ -71,4 +72,5 @@ func init() {
RootCmd.PersistentFlags().DurationVar(&dialTimeout, "dial-timeout", 0, "dial timeout for client connections") RootCmd.PersistentFlags().DurationVar(&dialTimeout, "dial-timeout", 0, "dial timeout for client connections")
RootCmd.PersistentFlags().BoolVar(&targetLeader, "target-leader", false, "connect only to the leader node") RootCmd.PersistentFlags().BoolVar(&targetLeader, "target-leader", false, "connect only to the leader node")
RootCmd.PersistentFlags().DurationVar(&autoSyncInterval, "auto-sync-interval", time.Duration(0), "AutoSyncInterval is the interval to update endpoints with its latest members")
} }

View File

@ -93,6 +93,7 @@ func mustCreateConn() *clientv3.Client {
dialTotal++ dialTotal++
} }
cfg := clientv3.Config{ cfg := clientv3.Config{
AutoSyncInterval: autoSyncInterval,
Endpoints: connEndpoints, Endpoints: connEndpoints,
DialTimeout: dialTimeout, DialTimeout: dialTimeout,
} }