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

Rollback redlock #135

Merged
merged 1 commit into from
May 25, 2023
Merged

Conversation

felixrieseberg
Copy link
Member

In #133, I've upgraded all dependencies, including node-redlock. We've discovered that the service fails to release locks under load:

2023-05-24T17:23:46.163885+00:00 app[web.1]: node:internal/process/promises:288
2023-05-24T17:23:46.163886+00:00 app[web.1]: triggerUncaughtException(err, true /* fromPromise */);
2023-05-24T17:23:46.163886+00:00 app[web.1]: ^
2023-05-24T17:23:46.165413+00:00 app[web.1]: LockError: Unable to fully release the lock on resource "locks:freebie-frenzy/freebie-frenzy-releases".
2023-05-24T17:23:46.165414+00:00 app[web.1]: at loop (/app/node_modules/redlock/redlock.js:282:18)
2023-05-24T17:23:46.165414+00:00 app[web.1]: at Object.callback (/app/node_modules/redlock/redlock.js:462:10)
2023-05-24T17:23:46.165414+00:00 app[web.1]: at /app/node_modules/@redis/client/dist/lib/client/index.js:431:39
2023-05-24T17:23:46.165415+00:00 app[web.1]: at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
2023-05-24T17:23:46.165415+00:00 app[web.1]: attempts: undefined
2023-05-24T17:23:46.165416+00:00 app[web.1]: }

Other people discovered similar issues using node-redlock >v4.. The module author never quite figured out what exactly was wrong - instead, they did a complete rewrite of node-redlock. Sadly, that rewrite no longer supports node-redis.

In an attempt to keep things simple, I'm simply rolling back node-redlock.

@felixrieseberg felixrieseberg requested a review from a team as a code owner May 24, 2023 23:45
@felixrieseberg
Copy link
Member Author

✅ Verified on staging.update.electronjs.org

@BlackHole1 BlackHole1 merged commit ccb19c5 into electron:main May 25, 2023
@felixrieseberg felixrieseberg deleted the rollback-redlock branch May 25, 2023 18:04
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

Successfully merging this pull request may close these issues.

2 participants