Initialize ScriptEvalMessage with the correct command by martinpotter · Pull Request #1930 · StackExchange/StackExchange.Redis
Currently the constructor for ScriptEvalMessage that takes a SHA1 hash, and sends the EVALSHA command, initializes the base Message class's command to RedisCommand.EVAL instead of RedisCommand.EVALSHA.
could you please also add a line to releasenotes.md (you'll see the pattern); if you're feeling especially generous, it would also be great to add a test here to show it working, but: if not, I can go back and add some here
wow; looks like we missed a critical test here
As far as I can tell, this really is only an issue for things like profiling (OpenTelemetry, NR, etc) that log the Command since ScriptEvalMessage overrides WriteImpl and [correctly writes] (
| if (hexHash != null) | |
| { | |
| physical.WriteHeader(RedisCommand.EVALSHA, 2 + keys.Length + values.Length); | |
| physical.WriteSha1AsHex(hexHash); | |
| } |
RedisCommand.EVALSHA to the connection.
@martinpotter that probably makes it even more useful to have a test, honestly :)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, thanks for the catch and the fix!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters