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

fix(producer): UpdateNameServerAddress shoule be called before producer start, or namesrvs list will be empty, lead to a panic #445

Merged
merged 4 commits into from
Mar 11, 2020

Conversation

hzjiangjian
Copy link
Contributor

@hzjiangjian hzjiangjian commented Mar 11, 2020

UpdateNameServerAddress shoule be called before producer start, or namesrvs list will be empty, lead to a panic。
Case: in private enviroment, start a consumer first, then start a producer, call publish. There whould be a panic.

蒋剑 added 3 commits February 28, 2020 14:43
…namesrv will be empty, lead to a panic when publish
…er start, or namesrvs list will be empty, lead to a panic
@ShannonDing ShannonDing added the bug Something isn't working label Mar 11, 2020
//if s.Size() == 0, response will be nil, lead to panic below.
if s.Size() == 0 {
rlog.Error("namesrv list empty. UpdateNameServerAddress should be called first.", map[string]interface{}{
"namesrv": s,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s.size ==0, then print s.

@codecov-io
Copy link

codecov-io commented Mar 11, 2020

Codecov Report

Merging #445 into native will decrease coverage by 0.1%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           native     #445      +/-   ##
==========================================
- Coverage   24.82%   24.72%   -0.11%     
==========================================
  Files          48       48              
  Lines        5547     5570      +23     
==========================================
  Hits         1377     1377              
- Misses       3982     4003      +21     
- Partials      188      190       +2
Impacted Files Coverage Δ
producer/producer.go 29.12% <0%> (-0.18%) ⬇️
internal/route.go 9.19% <0%> (-0.23%) ⬇️
producer/option.go 36% <0%> (-2.3%) ⬇️
consumer/push_consumer.go 12.37% <0%> (-0.04%) ⬇️
internal/client.go 0.23% <0%> (-0.01%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af4067c...cd17d7c. Read the comment docs.

@ShannonDing ShannonDing merged commit 1ce9fd9 into apache:native Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants