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
Recently, I had to investigate an issue with server failovers which cleared the SHA-1 hash cache and prevented me from evaluating back-end cached lua scripts because the hashes themselves did not exist on the server. The StackExchange.Redis version was quite outdated and did not feature the improvements in v2.6.66 which change how loaded scripts were evaluated.
Instead of sending the SHA-1 hash value, now the script itself is evaluated which works for our use case. However, I was trying to replicate the issue we experienced in an isolated environment using a docker container. I was not able to reproduce the initial issue after I updated the library, whenever I rebooted the container. The XML documentation for the LoadedLuaScript::Evaluate() & LoadedLuaScript::EvaluateAsync() do not reference the new behavior and mislead me. Finally, I had to take a look at the source code in order to understand why after a SCRIPT FLUSH [SYNC|ASYNC] command, the loaded lua scripts were able to be evaluated even though the hashes were not present on the server.
ℹ️ Update: After looking through the command logs with MONITOR, seems like if a previously loaded script's hash is not found on the server - it will be reloaded with SCRIPT LOAD. However, I'm seeing that it's evaluated with the EVAL command on the first evaluation, after the reload operation. Any subsequent evaluation uses EVALSHA.
The text was updated successfully, but these errors were encountered:
Recently, I had to investigate an issue with server failovers which cleared the
SHA-1
hash cache and prevented me from evaluating back-end cached lua scripts because the hashes themselves did not exist on the server. TheStackExchange.Redis
version was quite outdated and did not feature the improvements inv2.6.66
which change how loaded scripts were evaluated.Instead of sending the. However, I was trying to replicate the issue we experienced in an isolated environment using a docker container. I was not able to reproduce the initial issue after I updated the library, whenever I rebooted the container. TheSHA-1
hash value, now the script itself is evaluated which works for our use caseXML
documentation for theLoadedLuaScript::Evaluate()
&LoadedLuaScript::EvaluateAsync()
do not reference the new behavior and mislead me. Finally, I had to take a look at the source code in order to understand why after aSCRIPT FLUSH [SYNC|ASYNC]
command, the loaded lua scripts were able to be evaluated even though the hashes were not present on the server.ℹ️ Update: After looking through the command logs with
MONITOR
, seems like if a previously loaded script's hash is not found on the server - it will be reloaded withSCRIPT LOAD
. However, I'm seeing that it's evaluated with theEVAL
command on the first evaluation, after the reload operation. Any subsequent evaluation usesEVALSHA
.The text was updated successfully, but these errors were encountered: