perf(redis): avoid serializing addresses during unregister - #10835
Merged
ReubenBond merged 1 commit intoAug 26, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR optimizes the Redis grain-directory unregister path by removing an unnecessary JSON serialization of the full GrainAddress when the Redis delete script only needs the activation id, reducing per-call allocation and serialization overhead in the common success case.
Changes:
- Remove eager
JsonSerializer.Serialize(address)allocation duringUnregister. - Continue passing only
ActivationIdinto the Redis delete script while preserving conflict handling behavior.
Show a summary per file
| File | Description |
|---|---|
| src/Redis/Orleans.GrainDirectory.Redis/RedisGrainDirectory.cs | Removes unused address serialization in Unregister and keeps the script invocation based on activation id. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
Contributor
Code coverage77.61% line coverage - 97,578 / 125,721 lines Coverage details
|
This was referenced Aug 28, 2026
Merged
Merged
This was referenced Sep 4, 2026
This was referenced Sep 9, 2026
Closed
Closed
This was referenced Sep 16, 2026
Open
Merged
This was referenced Sep 23, 2026
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Redis grain-directory unregister operations serialized the full
GrainAddresseven though the delete script only consumes its activation ID. This removes that unused serialization.Rationale
Unregister remains activation-aware and preserves conflict handling while avoiding a JSON string allocation and serialization work on every successful call.
Microsoft Reviewers: Open in CodeFlow