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

feat(cluster): add prefix to distributed lock for autopipelining #3217

Merged
merged 1 commit into from
Apr 17, 2023

Conversation

p-fernandez
Copy link
Contributor

What change does this PR introduce?

Allows the autopipelining feature of Ioredis in Cluster mode to be used by the DistributedLock service.

Why was this change needed?

Seems we are still seeing spikes and probably head-of-line blocking is happening. We have autopipelining enabled in our Redis Cluster configuration. Adding the prefix should help to the problems we are noticing it.

Other information (Screenshots)

Comment on lines +139 to +147
// Unlock is still called even when the lock expires by going over TTL but errors
expect(spyUnlock).toHaveBeenCalledTimes(1);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change wasn't properly propagated in other PR. Adding again.

@p-fernandez p-fernandez force-pushed the feat-add-ioredis-prefix-to-distr-lock branch from bf1ce59 to 9d7b241 Compare April 17, 2023 13:09
Comment on lines +56 to +59
(elem) =>
elem.defaultValue !== undefined &&
elem.defaultValue !== null &&
!this.isSystemVariable(elem.name)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cspell complaining 🙄

Copy link
Contributor

Choose a reason for hiding this comment

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

Good! :P

@p-fernandez p-fernandez added this pull request to the merge queue Apr 17, 2023
Merged via the queue into next with commit ec2e061 Apr 17, 2023
11 checks passed
@p-fernandez p-fernandez deleted the feat-add-ioredis-prefix-to-distr-lock branch April 17, 2023 13:43
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.

None yet

2 participants