Skip to content

Commit

Permalink
replicaset: fix vshard bootstrap default timeout
Browse files Browse the repository at this point in the history
It was 3s instead of 10s.

Closes tarantool/tt-ee#232
  • Loading branch information
oleg-jukovec committed Oct 9, 2024
1 parent 333e7e8 commit 366f80c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- `tt start` error on start Tarantool 3 with encrypted etcd.
- `tt replicaset vshard bootstrap` unable to bootstrap large clusters due to
a timeout.
- `tt replicaset vshard bootstrap` timeout was 3s instead of 10s.

### Changed

Expand Down
11 changes: 6 additions & 5 deletions cli/cmd/replicaset.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ var (
replicasetSslCiphers string
replicasetForce bool
replicasetTimeout int
replicasetBootstrapTimeout int
replicasetIntegrityPrivateKey string
replicasetBootstrapVshard bool
replicasetCartridgeReplicasetsFile string
Expand Down Expand Up @@ -178,8 +179,8 @@ func newBootstrapCmd() *cobra.Command {
`file where replicasets configuration is described (default "<APP_DIR>/replicasets.yml")`)
cmd.Flags().StringVarP(&replicasetReplicasetName, "replicaset", "",
"", "replicaset name for an instance bootstrapping")
cmd.Flags().IntVarP(&replicasetTimeout, "timeout", "", replicasetcmd.
VShardBootstrapDefaultTimeout, "timeout")
cmd.Flags().IntVarP(&replicasetBootstrapTimeout, "timeout", "",
replicasetcmd.VShardBootstrapDefaultTimeout, "timeout")

return cmd
}
Expand All @@ -206,7 +207,7 @@ func newBootstrapVShardCmd() *cobra.Command {
addOrchestratorFlags(cmd)
addTarantoolConnectFlags(cmd)
integrity.RegisterWithIntegrityFlag(cmd.Flags(), &replicasetIntegrityPrivateKey)
cmd.Flags().IntVarP(&replicasetTimeout, "timeout", "",
cmd.Flags().IntVarP(&replicasetBootstrapTimeout, "timeout", "",
replicasetcmd.VShardBootstrapDefaultTimeout, "timeout")

return cmd
Expand Down Expand Up @@ -619,7 +620,7 @@ func internalReplicasetBootstrapVShardModule(cmdCtx *cmdcontext.CmdCtx, args []s
Orchestrator: ctx.Orchestrator,
Publishers: publishers,
Collectors: collectors,
Timeout: replicasetTimeout,
Timeout: replicasetBootstrapTimeout,
})
}

Expand All @@ -638,7 +639,7 @@ func internalReplicasetBootstrapModule(cmdCtx *cmdcontext.CmdCtx, args []string)
ReplicasetsFile: replicasetCartridgeReplicasetsFile,
Orchestrator: ctx.Orchestrator,
RunningCtx: ctx.RunningCtx,
Timeout: replicasetTimeout,
Timeout: replicasetBootstrapTimeout,
BootstrapVShard: replicasetBootstrapVshard,
Replicaset: replicasetReplicasetName,
}
Expand Down

0 comments on commit 366f80c

Please sign in to comment.