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

Lock interface & Context argument #803

Open
agcom opened this issue Mar 28, 2024 · 0 comments
Open

Lock interface & Context argument #803

agcom opened this issue Mar 28, 2024 · 0 comments

Comments

@agcom
Copy link

agcom commented Mar 28, 2024

The Redis-lock methods do not receive a context argument; the merged PR #652 did a trick of passing the Redis client's context to its own methods' calls, which I strongly doubt its impact. Moving on, go-redis was updated to v9 on #793; the new client removed access to its maybe internal context; therefore, the below line was commented.

// ctx := r.rclient.Context()

I guess that the lock interface methods should receive a context argument to possibly cancel the lock operation, specially in case the Redis calls take too much time; what are your thoughts?

@agcom agcom changed the title Redis-lock & Context argument Lock interface & Context argument Mar 28, 2024
agcom added a commit to agcom/machinery that referenced this issue Mar 28, 2024
agcom added a commit to agcom/machinery that referenced this issue Mar 28, 2024
agcom added a commit to agcom/machinery that referenced this issue Mar 28, 2024
agcom added a commit to agcom/machinery that referenced this issue Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant