Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not handling RefreshFrequency being 0 correctly. #1999

Closed
Jason5Lee opened this issue Aug 19, 2021 · 2 comments
Closed

Not handling RefreshFrequency being 0 correctly. #1999

Jason5Lee opened this issue Aug 19, 2021 · 2 comments
Labels
stale Issues and pull requests without any recent activity

Comments

@Jason5Lee
Copy link

Jason5Lee commented Aug 19, 2021

Versions

Please specify real version numbers or git SHAs, not just "Latest" since that changes fairly regularly.

Sarama Kafka Go
1.26.1 2.12-1.1.1 1.16.7
Configuration

What configuration values are you using for Sarama and Kafka?

saramaConfig = sarama.NewConfig()
saramaConfig.Consumer.Return.Errors = true
saramaConfig.ChannelBufferSize = defaultBufferSize
saramaConfig.Net.MaxOpenRequests = defaultConnectionNum
saramaConfig.Metadata.RefreshFrequency = 0 // disable metadata fetching;
saramaConfig.Version = sarama.V1_1_1_0
Logs
logs: CLICK ME

2021/08/19 20:53:02 Initializing new client
2021/08/19 20:53:02 ClientID is the default of 'sarama', you should consider setting it to something application-specific.
2021/08/19 20:53:02 ClientID is the default of 'sarama', you should consider setting it to something application-specific.
2021/08/19 20:53:02 client/metadata fetching metadata for all topics from broker localhost:9092
2021/08/19 20:53:02 Connected to broker at localhost:9092 (unregistered)
2021/08/19 20:53:02 client/brokers registered new broker #0 at <internal domain>:9092
2021/08/19 20:53:02 Successfully initialized new client
2021/08/19 20:53:02 Initializing new client
2021/08/19 20:53:02 ClientID is the default of 'sarama', you should consider setting it to something application-specific.
2021/08/19 20:53:02 ClientID is the default of 'sarama', you should consider setting it to something application-specific.
2021/08/19 20:53:02 client/metadata fetching metadata for all topics from broker localhost:9092
2021/08/19 20:53:02 Connected to broker at localhost:9092 (unregistered)
2021/08/19 20:53:02 client/brokers registered new broker #0 at <internal domain>:9092
2021/08/19 20:53:02 Successfully initialized new client
2021/08/19 20:53:02 client/metadata fetching metadata for [rebuild] from broker localhost:9092
2021/08/19 20:53:02 client/coordinator requesting coordinator for consumergroup test from localhost:9092
2021/08/19 20:53:02 client/coordinator coordinator for consumergroup test is #0 (<internal domain>:9092)
2021/08/19 20:53:02 ClientID is the default of 'sarama', you should consider setting it to something application-specific.
2021/08/19 20:53:02 Connected to broker at <internal domain>:9092 (registered as #0)
2021/08/19 20:53:02 client/coordinator requesting coordinator for consumergroup test from localhost:9092
2021/08/19 20:53:02 client/coordinator coordinator for consumergroup test is #0 (<internal domain>:9092)
panic: non-positive interval for NewTicker

goroutine 27 [running]:
time.NewTicker(0x0, 0x0)
        <HOME>/.local/go/src/time/tick.go:24 +0x151
github.com/Shopify/sarama.(*consumerGroup).loopCheckPartitionNumbers(0xc0002bac60, 0xc0002b43c0, 0x1, 0x4, 0xc000210080)
        <GO PATH>/pkg/mod/github.com/!shopify/sarama@v1.26.1/consumer_group.go:442 +0x66
created by github.com/Shopify/sarama.(*consumerGroup).Consume
       <GO PATH>/pkg/mod/github.com/!shopify/sarama@v1.26.1/consumer_group.go:176 +0x259

Problem Description

The document of the RefreshFrequency states

Set to 0 to disable.

But it seems that it is not handled correctly and causing panic.

@github-actions

This comment was marked as outdated.

@github-actions github-actions bot added the stale Issues and pull requests without any recent activity label Aug 30, 2023
@dnwe
Copy link
Collaborator

dnwe commented Aug 30, 2023

Fixed by #2329

@dnwe dnwe closed this as completed Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issues and pull requests without any recent activity
Projects
None yet
Development

No branches or pull requests

2 participants