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

[WIP] Distributed lock: add Lock (blocking) and RenewLock methods #3046

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ItalyPaleAle
Copy link
Contributor

@ItalyPaleAle ItalyPaleAle commented Aug 5, 2023

Implements the components-contrib part (and the implementation for the only lock store component, Redis) for dapr/dapr#3549

Adds two methods to the distributed lock components:

  • Lock acquires a lock. Unlike TryLock, it blocks until it successfully acquires a lock if someone else owns it (or until the context is canceled)
  • RenewLock renews an existing lock, extending its duration

Behavior is validated by conformance tests

@github-actions
Copy link

github-actions bot commented Sep 4, 2023

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions bot added the stale label Sep 4, 2023
@ItalyPaleAle ItalyPaleAle added pinned Issue does not get stale and removed stale labels Sep 5, 2023
Includes conformance tests

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
…o lock-renew

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
ItalyPaleAle added a commit to ItalyPaleAle/dapr-components-contrib that referenced this pull request Dec 18, 2023
Also replaces `golang.org/x/exp/slices` with `slices` from the Go 1.21 stdlib

> small spin-off from dapr#3046

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
…o lock-renew

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pinned Issue does not get stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant