-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
Bump golang version to 1.19.1 #14463
Conversation
Related to #14449 |
868466b
to
7578ecc
Compare
Codecov Report
@@ Coverage Diff @@
## main #14463 +/- ##
==========================================
- Coverage 75.35% 75.20% -0.16%
==========================================
Files 457 457
Lines 37258 37258
==========================================
- Hits 28077 28019 -58
- Misses 7413 7459 +46
- Partials 1768 1780 +12
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
This PR is ready for review. The Release failure is because it always run I suggest to review this PR commit by commit. cc @ptabor @serathius @spzala @mitake |
9192a96
to
29bb9a3
Compare
ref. https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.24.md This is not blocker for upgrading to 1.19. However, I think it's something we should have some visibility into, e.g. comparing memory used between latest stale release and main branch. @ahrtr For example, looks like etcd/etcdctl/ctlv3/command/check.go Lines 296 to 311 in 89637a4
|
There are some memory model changes in go 1.18 & 1.19. Go 1.18 includes non-heap sources of garbage collector work, so there may be some big change on the memory usage if there are lots of stack memory relative to heap memory. The workaround is to adjust Go 1.19 supports soft memory limit, and it should be a very good feature to resolve the OOM issue out of the box. Previously some companies resolves the OOM of go program built with go version < 1.19 by some workaround solutions, which are either non-portable or hard to understand & maintain. It's exactly the reason why go 1.19 introduce the soft memory limit. I believe it's also a good benefit for etcd, and there is no any action from etcd side because users limit the memory usage via env In summary, we need to bump go 1.19 anyway. But it's worthwhile to do some benchmark test, so that we can provide some guide & reference to users. |
FYI. Kubernetes did similar test kubernetes/kubernetes#108357 (comment) |
The performance result shows that etcd built with go1.19.1 is a little better than etcd built with 1.17.9. Command
Linux server configuration
Simple summary
Result for etcd built with 1.17.9 on
|
@serathius @mitake @spzala @ptabor This PR should be ready to go. Please take a look. Just as I mentioned in #14463 (comment), the benefit of go 1.19.1 is that users can resolve the OOM issue by setting the env |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, any expected breaking changes we should inform users in changelog?
For example there were some problematic changes between go 1.16 and 1.17
No any breaking change for users, including applications which depend on the etcd packages and the etcd binaries or image users. Go 1.19 still keeps the Go 1 promise of compatibility |
Signed-off-by: Benjamin Wang <wachao@vmware.com>
Signed-off-by: Benjamin Wang <wachao@vmware.com>
1. run ./scripts/fix.sh; 2. cd tools/mod; gofmt -w . & go mod tidy; Signed-off-by: Benjamin Wang <wachao@vmware.com>
Some comments in the file are formatted automatically into ugly style, because the hierarchical structure is missing. After removing the leading numbers in the comments, `go fmt` will not format the comments anymore. Signed-off-by: Benjamin Wang <wachao@vmware.com>
Just rebased this PR. Will merge when the test green. |
Kubernetes already upgraded to 1.19 since release-1.25, so etcd should upgrade to 1.19 as well.
Signed-off-by: Benjamin Wang wachao@vmware.com
Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.