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
[WIP] Remove catalog activations locking #5526
Conversation
65496e9
to
cfd0c4b
Compare
@@ -443,20 +439,19 @@ public void GetGrainTypeInfo(int typeCode, out string grainClass, out PlacementS | |||
activatedPromise = Task.CompletedTask; | |||
PlacementStrategy placement; | |||
|
|||
lock (activations) | |||
while (true) |
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.
this smells bad. why are we adding infinite retry here while the original logic didn't?
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.
this is a standard lock-free approach when dealing with optimistic concurrency conflicts
In reply to: 274565380 [](ancestors = 274565380)
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.
I see. Thanks for explaining !
can this be called concurrently or is this single threaded? Because if it's the first option, you'll have to use some kind of locking primitive, not necessarily on Refers to: src/Orleans.Runtime/Catalog/Catalog.cs:1383 in cfd0c4b. [](commit_id = cfd0c4b, deletion_comment = False) |
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.
No description provided.