State inconsistency bug in orleans/Chirper/Chirper.Grains/ChirperAccount.cs
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- csharp
- Domain
- backend, distributed-systems
Research direction
Start in orleans/Chirper/Chirper.Grains/ChirperAccount.cs by tracing FollowUserIdAsync and UnfollowUserIdAsync, then review the linked Orleans Chirper documentation for the reentrant-grain context. Done means concurrent follow and unfollow operations for the same username leave local and remote state consistent and preserve command ordering.
Written by the indexing model from the issue text.
Description
https://github.com/dotnet/samples/blob/main/orleans/Chirper/Chirper.Grains/ChirperAccount.cs
FollowUserIdAsync and UnfollowUserIdAsync may not interleave, but the grain is reentrant. Interleaving can cause 2 problems if both methods get called with the same username on the same grain:
- If a user gets followed, but between the remote and local update, he gets unfollowed, the local state says the user is followed, but the remote state says the user is not followed. Same vice versa.
- The follow and unfollow commands may arrive on the other grain in reverse of sending order, causing the same inconsistencies.
I don't see a way to keep the grain fully reentrant, which is unfortunate, because this is supposed to be a demonstration for reentrant grains: https://learn.microsoft.com/en-us/samples/dotnet/samples/orleans-chirper-social-media-sample-app/
- Dominant language
- C#
- Stars
- 3.7k
- Forks
- 5.1k
- Avg merge
- 8m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/samples
-
dotnet-target-version
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
dotnet-target-version
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
dotnet-target-version
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
dotnet-target-version
Difficulty 4/5 3-5 days Newbie friendliness 52/100
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:auth FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1788 ·