Skip to content
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

Ensure reminder table is initialized before access #8982

Merged

Conversation

ReubenBond
Copy link
Member

@ReubenBond ReubenBond commented May 7, 2024

It is possible that the IReminderTable implementation might be accessed before it has been successfully initialized. This PR ensures that is not the case for LocalReminderService by initializing the table before starting the LocalReminderService and before grains are allowed to start.

While doing so, I also implemented support for CancellationToken in IReminderTable for startup/shutdown, obsoleting the existing Init() method and replacing it with StartAsync(CancellationToken), adding a new StopAsync(CancellationToken).

Microsoft Reviewers: Open in CodeFlow

@ReubenBond ReubenBond added the Needs: backport PRs which should be backported to a (prior) release branch label May 7, 2024
@ReubenBond ReubenBond force-pushed the fix/reminder-service-startup-order branch from 61223a3 to fd9b246 Compare May 8, 2024 21:34
@ReubenBond ReubenBond merged commit d54dd32 into dotnet:main May 8, 2024
18 checks passed
@ReubenBond ReubenBond deleted the fix/reminder-service-startup-order branch May 8, 2024 23:13
ReubenBond added a commit to ReubenBond/orleans that referenced this pull request May 10, 2024
* Ensure reminder table is initialized before access

(cherry picked from commit d54dd32)
ReubenBond added a commit that referenced this pull request May 13, 2024
* Ensure reminder table is initialized before access

(cherry picked from commit d54dd32)
@github-actions github-actions bot locked and limited conversation to collaborators Jun 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs: backport PRs which should be backported to a (prior) release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants