mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
fix: disable reset kafka connection timeout (#28681)
pr: https://github.com/milvus-io/milvus/pull/28642 issue https://github.com/milvus-io/milvus/issues/28588 Signed-off-by: Enwei Jiao <enwei.jiao@zilliz.com>
This commit is contained in:
parent
33bbdf6c88
commit
c73bb26782
@ -59,13 +59,13 @@ func NewKafkaClientInstanceWithConfigMap(config kafka.ConfigMap, extraConsumerCo
|
||||
func NewKafkaClientInstanceWithConfig(ctx context.Context, config *paramtable.KafkaConfig) (*kafkaClient, error) {
|
||||
kafkaConfig := getBasicConfig(config.Address.GetValue())
|
||||
|
||||
// connection setup timeout, default as 30000ms
|
||||
// connection setup timeout, default as 30000ms, available range is [1000, 2147483647]
|
||||
if deadline, ok := ctx.Deadline(); ok {
|
||||
if deadline.Before(time.Now()) {
|
||||
return nil, errors.New("context timeout when new kafka client")
|
||||
}
|
||||
timeout := time.Until(deadline).Milliseconds()
|
||||
kafkaConfig.SetKey("socket.connection.setup.timeout.ms", timeout)
|
||||
// timeout := time.Until(deadline).Milliseconds()
|
||||
// kafkaConfig.SetKey("socket.connection.setup.timeout.ms", timeout)
|
||||
}
|
||||
|
||||
if (config.SaslUsername.GetValue() == "" && config.SaslPassword.GetValue() != "") ||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user