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

fix: make restore idempotent #23

Merged
merged 1 commit into from
Jun 30, 2024
Merged

fix: make restore idempotent #23

merged 1 commit into from
Jun 30, 2024

Conversation

ctrox
Copy link
Owner

@ctrox ctrox commented Jun 30, 2024

The activator used a sync.Once to ensure onAccept is only called once per restore but that lead to an invalid unlock in rare cases since we had to reset the sync.Once when checkpointing. A more robust solution is to get rid of the sync.Once, call onAccept on every accept and then let the restore function handle being called multiple times.

The activator used a sync.Once to ensure onAccept is only called once
per restore but that lead to an invalid unlock in rare cases since
we had to reset the sync.Once when checkpointing. A more robust solution
is to get rid of the sync.Once, call onAccept on every accept and then
let the restore function handle being called multiple times.
@ctrox ctrox merged commit 6bd9a42 into main Jun 30, 2024
4 checks passed
@ctrox ctrox deleted the accept-idempotent branch June 30, 2024 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant