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

lease: Rename Poll to Peek in the LeaseExpiredNotifier #14198

Merged
merged 1 commit into from
Jul 7, 2022

Conversation

SimFG
Copy link
Contributor

@SimFG SimFG commented Jul 7, 2022

Poll means that the elements in the heap will be removed.
And it is more appropriate to use Peek to get the top of the heap.

Signed-off-by: SimFG 1142838399@qq.com

Copy link
Member

@serathius serathius left a comment

Choose a reason for hiding this comment

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

I did some Googling and found that peek is much more popular way to name this function.

`Poll` means that the elements in the heap will be removed.
And it is more appropriate to use `Peek` to get the top of the heap.

Signed-off-by: SimFG <1142838399@qq.com>
@SimFG
Copy link
Contributor Author

SimFG commented Jul 7, 2022

@serathius yeah, I think it's better.

@SimFG SimFG changed the title lease: Rename Poll to Top in the LeaseExpiredNotifier lease: Rename Poll to Peek in the LeaseExpiredNotifier Jul 7, 2022
@ahrtr
Copy link
Member

ahrtr commented Jul 7, 2022

Both Peek and Top are OK, but actually Top fits more in this case, because we only want to check the status of the top 1 entry and it's clearer.

It isn't a big deal, so approving this PR.

Copy link
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.

Thank you, @SimFG

@ahrtr ahrtr merged commit 186c895 into etcd-io:main Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants