You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have no idea how to replicate this issue because it happens completely randomly with no reliable way to make it occur. However it was immediately fixed when downgrading to 3.1.2. So my intuition is about an optimization between 4.0-4.2. I've also tried this on both redis 5 & 6 with no difference in behavior.
My guess is it has something to do with a premature optimization of whether or not to send the locking script with the request on this commit.
While I'm sure this is a great optimization for those that happen to be acquiring hundreds of thousands of locks and rapidly extending them multiple thousands of times per second (or to save a few $ on bandwidth). It seems there may be a potential miss whether the cache is reliable enough to use. From my experience trying to debug this library I have had the lock sometimes work and sometimes arbitrarily stop working. Same with extend, it would work with ioredis but not node redis then all of a sudden neither one worked, then ioredis would work but node redis wouldn't. I thought it was prefixes at first because of this issue. Having removed the prefixes and tried a bunch of different mutations of node redis and ioredis with varying degrees of options it seems prefixes and many options are completely transparent to redlock (as it should).
As I said before, I'd love to give a nice example of what is actually broken with evidence it's specifically the evalsha, but I cannot in any way get this to reliably execute after the evalsha optimization has been included. Which leads me to believe that change is not properly handled the errors. Anyone else running into perpetual locks never terminating or extend functions never resolving/rejecting I'd throw out trying to downgrade to 3.1.2, 4.0.0, or 4.1.0 to see if it resolves your issue.
The text was updated successfully, but these errors were encountered:
here i got some clue.
when i pass a very small number to extend method, it won't return, i tried negative numbers, 0, and <10 numbers, and by using those numbers as parameter, the extend function won't return.
I have no idea how to replicate this issue because it happens completely randomly with no reliable way to make it occur. However it was immediately fixed when downgrading to 3.1.2. So my intuition is about an optimization between 4.0-4.2. I've also tried this on both redis 5 & 6 with no difference in behavior.
My guess is it has something to do with a premature optimization of whether or not to send the locking script with the request on this commit.
While I'm sure this is a great optimization for those that happen to be acquiring hundreds of thousands of locks and rapidly extending them multiple thousands of times per second (or to save a few $ on bandwidth). It seems there may be a potential miss whether the cache is reliable enough to use. From my experience trying to debug this library I have had the lock sometimes work and sometimes arbitrarily stop working. Same with extend, it would work with ioredis but not node redis then all of a sudden neither one worked, then ioredis would work but node redis wouldn't. I thought it was prefixes at first because of this issue. Having removed the prefixes and tried a bunch of different mutations of node redis and ioredis with varying degrees of options it seems prefixes and many options are completely transparent to redlock (as it should).
As I said before, I'd love to give a nice example of what is actually broken with evidence it's specifically the evalsha, but I cannot in any way get this to reliably execute after the evalsha optimization has been included. Which leads me to believe that change is not properly handled the errors. Anyone else running into perpetual locks never terminating or extend functions never resolving/rejecting I'd throw out trying to downgrade to 3.1.2, 4.0.0, or 4.1.0 to see if it resolves your issue.
The text was updated successfully, but these errors were encountered: