Use EnumSet to classify lettuce-5 commands - #12288
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 039ef26f94
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
🎯 Code Coverage (details) 🔗 Commit SHA: f2408b5 | Docs | View more details | Give us feedback! |
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
There was a problem hiding this comment.
More details
The enum checks keep the prior command classes. The fallback keeps the prior string behavior for custom protocol keywords.
🤖 Datadog Autotest · Commit df04581 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
vandonr
left a comment
There was a problem hiding this comment.
looks good modulo a little bit of duplication that I think we could get rid of
There was a problem hiding this comment.
Pre-approving.
With this comment it looks good too : #12288 (comment)
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
What Does This Do
Replaces the String-based NON_INSTRUMENTING_COMMAND_WORDS/AGENT_CRASHING_COMMANDS_WORDS sets in lettuce-5.0's LettuceInstrumentationUtil with EnumSet, guarded by instanceof CommandType (matching the existing lettuce-4.0 pattern, since RedisCommand.getType() returns the ProtocolKeyword interface and custom/user-dispatched commands aren't guaranteed to be CommandType).
This avoids a per-command toString()/trim() string allocation plus hash-based lookup on every single Redis command, replaced with an allocation-free enum bit-test.
JMH run:
Set<String>)EnumSet<CommandType>)Motivation
Additional Notes
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]