-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stashing fix #1480
Stashing fix #1480
Conversation
@@ -43,7 +43,7 @@ public void ConsistentHashingGroup_must_use_same_hash_ring_indepenent_of_self_ad | |||
var keys = new List<string>(new [] { "A", "B", "C", "D", "E", "F", "G"}); | |||
var result1 = keys.Select(k => consistentHash1.NodeFor(k).Routee); | |||
var result2 = keys.Select(k => consistentHash2.NodeFor(k).Routee); | |||
result1.ShouldBeEquivalentTo(result2); | |||
Assert.Equal(result2,result1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ignore this line, this is a fix for the broken dev branch.
We could ofcourse just replace the counter with a bool, but that would make a weird coupling between the actorcell and the stashing plugin. |
Looks like this build crashed on running the normal Xunit assemblies. Going to re-run it and see if we can reproduce.
LOOKS like it choked out on an Akka.Remote test, but can't say for certain. Might have moved on and started running another assembly after that last error message. |
Need some code review on this cc @akkadotnet/contributors |
@rogeralsing I think the decoupled design you have now has better conceptual integrity, so I like your current approach |
Could you provide some before/after benchmarks on that? |
Benchmarks on the single |
@rogeralsing consequences may not end up on a single line ;) After all, change from |
Original code, no fix applied (and no they are not mixed up and the new code is not actually faster than the old, its just error margins :P ) Providing a benchmark in code would be problematic as that would require that we add conditional compilation directives to enable/disable the stash fix |
Related #1489 |
This is a suggestion on how to solve the stashing #1400 issue
The mechanics in this PR works by incrementing an envelopeId in the actorcell for each user message received.
Once you call
Stash
the stash plugin will check if it has already stashed this envelope Id.This has minimal impact on performance and we can still keep our envelopes as structs.
The solution is also unaffected by async await features as the envelope ID is only touched when processing user messages.
Thoughts?