Skip to content

Conversation

@martinpotter
Copy link
Contributor

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.

@mgravell
Copy link
Collaborator

wow; looks like we missed a critical test here - presumably this never worked! good eyes

@mgravell
Copy link
Collaborator

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

@martinpotter
Copy link
Contributor Author

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.

@mgravell
Copy link
Collaborator

@martinpotter that probably makes it even more useful to have a test, honestly :)

@NickCraver
Copy link
Collaborator

Missed the force push here, thanks for the test update! Kicking off builds :)

Copy link
Collaborator

@NickCraver NickCraver left a comment

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!

@NickCraver NickCraver merged commit 1384bd8 into StackExchange:main Dec 31, 2021
NickCraver added a commit that referenced this pull request Dec 31, 2021
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.

3 participants