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 registry TTL. #1537

Merged
merged 3 commits into from
Oct 11, 2021
Merged

fix registry TTL. #1537

merged 3 commits into from
Oct 11, 2021

Conversation

aiscrm
Copy link
Contributor

@aiscrm aiscrm commented Oct 8, 2021

  1. When etcd stops, the application cannot stop.
  2. Stop consul first, then stop app. Then start consul, the registered service remains in consul registry as an unhealthy status.

1. When etcd stops, the application cannot stop.
2. Stop consul first, then stop app. Then start consul, the registered service remains in consul registry as an unhealthy status.
@aiscrm
Copy link
Contributor Author

aiscrm commented Oct 8, 2021

主要解决两个问题:
1、使用consul作为registry,服务运行期间,如果停止consul,然后再停止服务。这时如果再启动consul,这个服务会永远在consul里不会消失,而且一直是unhealthy的状态。
2、使用etcd作为registry,服务运行期间,停止etcd,然后再停止服务,服务会一直挂在那里停不掉,并且registry心跳一直在报错。此时再启动etcd,服务也还是不会退出,但过一会在etcd中注册的这个服务会不存在了,但访问服务还是没问题的,也就是虽然服务还在,但已经不能被发现了。

@codecov-commenter
Copy link

codecov-commenter commented Oct 11, 2021

Codecov Report

Merging #1537 (9d97ce8) into main (a996590) will increase coverage by 0.11%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1537      +/-   ##
==========================================
+ Coverage   68.54%   68.65%   +0.11%     
==========================================
  Files          67       67              
  Lines        3090     3111      +21     
==========================================
+ Hits         2118     2136      +18     
- Misses        792      795       +3     
  Partials      180      180              
Impacted Files Coverage Δ
app.go 74.73% <0.00%> (-0.80%) ⬇️
transport/http/transport.go 85.18% <0.00%> (ø)
internal/context/context.go 100.00% <0.00%> (+2.98%) ⬆️
config/value.go 68.23% <0.00%> (+3.61%) ⬆️

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 a996590...9d97ce8. Read the comment docs.

@tonybase tonybase changed the title fix registry. fix registry TTL. Oct 11, 2021
@tonybase tonybase merged commit 9743ad8 into go-kratos:main Oct 11, 2021
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.

4 participants