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: clusterBasic default value bug #386

Closed
wants to merge 1 commit into from

Conversation

liuzheng
Copy link
Contributor

@liuzheng liuzheng commented Apr 9, 2020

配置文件bug,文档上说免配置部分参数,实际上代码bug,未做到

bug复现

参考文档:https://github.com/baidu/bfe/blob/develop/docs/zh_cn/example/route.md

其中Step 3. 配置集群的基础信息 (conf/server_data_conf/cluster_conf.data) 配置集群cluster_demo_static和cluster_demo_dynamic健康检查的参数,其他均使用默认值

按照文档配置,报错

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x715ac5]

goroutine 1 [running]:
github.com/baidu/bfe/bfe_route/bfe_cluster.(*BfeCluster).BasicInit(0xc00009e500, 0x0, 0xc00033d700, 0x0, 0x0)
        /bfe/bfe_route/bfe_cluster/bfe_cluster.go:65 +0x55
github.com/baidu/bfe/bfe_route.(*ClusterTable).BasicInit(0xc000390220, 0xc000341ec0, 0xc000096490)
        /bfe/bfe_route/cluster_table.go:71 +0x28c
github.com/baidu/bfe/bfe_route.(*ClusterTable).Init(0xc000390220, 0xc0000b5740, 0x27, 0x0, 0xc00038c540)
        /bfe/bfe_route/cluster_table.go:55 +0x9e
github.com/baidu/bfe/bfe_route.(*ServerDataConf).clusterTableLoad(0xc000341640, 0xc0000b5740, 0x27, 0xc0000b5590, 0x23)
        /bfe/bfe_route/server_data_conf.go:100 +0x47

@CLAassistant
Copy link

CLAassistant commented Apr 9, 2020

CLA assistant check
All committers have signed the CLA.

@codecov-io
Copy link

Codecov Report

Merging #386 into master will decrease coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #386      +/-   ##
==========================================
- Coverage   53.01%   52.96%   -0.05%     
==========================================
  Files         244      244              
  Lines       22971    22971              
==========================================
- Hits        12177    12167      -10     
- Misses       9393     9400       +7     
- Partials     1401     1404       +3     
Impacted Files Coverage Δ
...bfe_cluster_conf/cluster_conf/cluster_conf_load.go 51.25% <100.00%> (ø)
bfe_util/fixed_pool.go 83.33% <0.00%> (-16.67%) ⬇️
bfe_spdy/server_write_sched.go 78.46% <0.00%> (-1.54%) ⬇️
bfe_websocket/server_conn.go 76.51% <0.00%> (-1.52%) ⬇️
bfe_spdy/server_conn.go 78.09% <0.00%> (-0.89%) ⬇️
bfe_http2/server.go 71.83% <0.00%> (ø)
bfe_spdy/frame_write.go 50.50% <0.00%> (ø)

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 b2d8a90...ceebce3. Read the comment docs.

@liuzheng
Copy link
Contributor Author

liuzheng commented Apr 9, 2020

表示是在v0.8.0的分支上做的测试,刚发现 #382

有点郁闷,在思考

@liuzheng liuzheng changed the base branch from master to develop April 9, 2020 08:50
@liuzheng liuzheng changed the base branch from develop to master April 9, 2020 08:51
@liuzheng liuzheng closed this Apr 9, 2020
@iyangsj
Copy link
Member

iyangsj commented Apr 9, 2020

@liuzheng 感谢你的关注和贡献!大家也发现这个问题了

下次可以写代码前,可以提前告知登记一个bug issue ,认领后再启动开发

@iyangsj
Copy link
Member

iyangsj commented Apr 9, 2020

@liuzheng 请将微信号发送至 bfe-osc@baidu.com(标题:申请加入开源BFE开发者社区)
我们会邀请您加入开源BFE开发者微信群方便交流

@liuzheng
Copy link
Contributor Author

liuzheng commented Apr 9, 2020

@iyangsj 遇到bug了顺手修了😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants