chore: expose query_redis_for_key_value #46
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently,
LockManagerabstracts away the underlying Redis connections, which prevents users from inspecting the value of a lock they failed to acquire without creating a separate, redundant Redis client.In distributed systems where a lock represents "Leader" or "Worker" ownership of a resource, the lock's value often contains the address (e.g., DNS name or IP) of the current owner.
If a client fails to acquire a lock (
lock()returnsErr), they often need to "follow" the lock by reading its value to find out who currently owns it (e.g., to proxy a request to the active leader).This allows users to reuse the existing connection pool managed by
rslockto perform these lookups, rather than managing a secondary Redis pool just for inspection.