Skip to content

clientv3: create keepAliveCtxCloser goroutine only if ctx can be canc…#16200

Merged
ahrtr merged 1 commit intoetcd-io:mainfrom
kensou97:keepalive-ctx-closer
Jul 14, 2023
Merged

clientv3: create keepAliveCtxCloser goroutine only if ctx can be canc…#16200
ahrtr merged 1 commit intoetcd-io:mainfrom
kensou97:keepalive-ctx-closer

Conversation

@kensou97
Copy link
Copy Markdown
Contributor

@kensou97 kensou97 commented Jul 9, 2023

We always create a keepAliveCtxCloser goroutine to eagerly update keepAlive when ctx is done.
But if ctx can never be canceled, there is no need to start a redundant goroutine.

Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.

…eled

Signed-off-by: zhangwenkang <zwenkang@vmware.com>
Comment thread client/v3/lease.go
Copy link
Copy Markdown
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@ahrtr ahrtr left a comment

Choose a reason for hiding this comment

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

LGTM

thx @kensou97

Please also backport this PR to 3.5 and 3.4 if needed.

@kensou97
Copy link
Copy Markdown
Contributor Author

LGTM

thx @kensou97

Please also backport this PR to 3.5 and 3.4 if needed.

ok

Copy link
Copy Markdown
Member

@chaochn47 chaochn47 left a comment

Choose a reason for hiding this comment

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

LGTM

@ahrtr ahrtr merged commit c59bc52 into etcd-io:main Jul 14, 2023
@serathius serathius mentioned this pull request Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

5 participants