Skip to content
This repository was archived by the owner on May 14, 2021. It is now read-only.

use non mocking redis#368

Open
doodyparizada wants to merge 1 commit intomasterfrom
add_redis_lock_test
Open

use non mocking redis#368
doodyparizada wants to merge 1 commit intomasterfrom
add_redis_lock_test

Conversation

@doodyparizada
Copy link
Copy Markdown
Contributor

No description provided.

@doodyparizada doodyparizada requested a review from a team July 23, 2019 15:18
const resource = `uniq:${ generateId() }`;
await Promise.all([
lock(resource, f),
lock(resource, f)]);
Copy link
Copy Markdown
Contributor

@liorama liorama Jul 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But if the delay is 500ms and the RedLock config is set to 10 retries with 200ms wait between them that means that the resource will be unlocked before all retries have been exhausted and the second call to f will be done and num increased to 2. Right?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants