node-redlock
node-redlock copied to clipboard
await redlock.using will never resolve
Hi, I don't know what causes this behaviour, but no matter how I try to use your code, I am never getting it to work
redlock.using([`util:${this.settings.hostIP}`], minimalDelay+1, async signal => {
const result = await stuff(ctx.params.cred) // takes approx 5s
if (signal.aborted) {
throw signal.error
}
return result
})
I always error out:
ExecutionError: The operation was unable to achieve a quorum during its retry window.
at Redlock._execute (/app/node_modules/redlock/dist/cjs/index.js:296:23)
at async Redlock.acquire (/app/node_modules/redlock/dist/cjs/index.js:213:34)
attempts: [
Promise { [Object] },
...,
Promise { [Object] }
]
And when I increase the tries before erroring out, it will just never resolve What could I be doing wrong? Thanks
To further add to this, this happens from the beginning on, not even once does "stuff" run.
I am using one redis server, my app and the server in one docker-compose
Just encountered this. We were able to work around this by using the await lock.acquire() api.
hello @mike-marcacci , this issue should be fixed with the PR which got merged. We're waiting for you to release a new npm version for redlock with this fix ASAP as my team has a requirement for using auto extending locks.
Hello, @mike-marcacci , please, release new version with #274
Hi, @mike-marcacci , could you be so kind to release a new version with that fix, please?
hey guys just wanted to chime in here, what is blocking this? I am also having issues with this same thing.
https://github.com/mike-marcacci/node-redlock/pull/274#issuecomment-1610154289