etcd icon indicating copy to clipboard operation
etcd copied to clipboard

Define a `DLocker` interface for distributed locker

Open ahrtr opened this issue 1 year ago • 6 comments

Also updated the contrib/lock example to demo how to use the DLocker.

For more background, please refer to the article by Martin Kleppmann.

  • It should be an improvement to help users better use etcd as a distributed lock.
  • It's also backward compatible. It won't break any existing applications

ahrtr avatar Oct 24 '24 15:10 ahrtr

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahrtr

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Oct 24 '24 15:10 k8s-ci-robot

Codecov Report

:x: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 68.78%. Comparing base (18eb5c6) to head (bddc7a9). :warning: Report is 2026 commits behind head on main.

:warning: Current head bddc7a9 differs from pull request most recent head 9786c9e

Please upload reports for the commit 9786c9e to get more accurate results.

Files with missing lines Patch % Lines
client/v3/concurrency/mutex.go 0.00% 3 Missing :warning:
Additional details and impacted files
Files with missing lines Coverage Δ
client/v3/concurrency/mutex.go 63.75% <0.00%> (+2.71%) :arrow_up:

... and 16 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #18779      +/-   ##
==========================================
+ Coverage   68.74%   68.78%   +0.04%     
==========================================
  Files         420      420              
  Lines       35512    35515       +3     
==========================================
+ Hits        24411    24430      +19     
+ Misses       9671     9659      -12     
+ Partials     1430     1426       -4     

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 18eb5c6...9786c9e. Read the comment docs.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov-commenter avatar Oct 24 '24 15:10 codecov-commenter

/test pull-etcd-verify

I want to check if it was a flake in govet.

ivanvc avatar Oct 24 '24 17:10 ivanvc

/test pull-etcd-integration-1-cpu-amd64

ahrtr avatar Oct 26 '24 18:10 ahrtr

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

k8s-ci-robot avatar Jan 19 '25 19:01 k8s-ci-robot

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Aug 14 '25 00:08 github-actions[bot]

@ahrtr: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-etcd-markdown-lint 9786c9e1c208ff63a96ea22c9ddc9de7da3dfebb link true /test pull-etcd-markdown-lint
ci-etcd-robustness-release36-amd64 9786c9e1c208ff63a96ea22c9ddc9de7da3dfebb link true /test ci-etcd-robustness-release36-amd64
ci-etcd-robustness-release35-amd64 9786c9e1c208ff63a96ea22c9ddc9de7da3dfebb link true /test ci-etcd-robustness-release35-amd64
ci-etcd-robustness-release34-amd64 9786c9e1c208ff63a96ea22c9ddc9de7da3dfebb link true /test ci-etcd-robustness-release34-amd64
pull-etcd-govulncheck-main 9786c9e1c208ff63a96ea22c9ddc9de7da3dfebb link true /test pull-etcd-govulncheck-main
pull-etcd-govulncheck 9786c9e1c208ff63a96ea22c9ddc9de7da3dfebb link true /test pull-etcd-govulncheck

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

k8s-ci-robot avatar Aug 26 '25 10:08 k8s-ci-robot

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Oct 30 '25 00:10 github-actions[bot]