logdna / logdna/exclusive-lock-node

Identify lock owners with UUIDs to ensure exclusive refreshing

Open
#3 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Per the initial PR, there is no guarantees that the instance refreshing the lock is the real owner: https://github.com/logdna/exclusive-lock-node/pull/2#discussion_r904696437

To solve this, we would need to keep state of the locks with UUIDs, etc. The problem is that we lose atomicity since redis/keydb does not have a `check-and-set` functionality. A `lua` script could be used, but that comes at a performance cost of stopping all other commands, so on something that's potentially refreshing a lot, this may be significant.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked initial PR discussion and the lock-refreshing flow in this repository. Define how UUID ownership should be tracked and verified with Redis/KeyDB, then evaluate whether a Lua-based check-and-set preserves exclusive refreshing without unacceptable performance costs.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, lua, redis
Domain
distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.