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

Clear previous changes before locking process for heartbeat #351

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

rosa
Copy link
Member

@rosa rosa commented Sep 16, 2024

For example, in case of a previous heartbeat failed because of a DB issue (with SQLite depending on configuration, a BusyException is not rare) and we still have the unpersisted value in last_heartbeat_at, which means that with_lock will result in:

RuntimeError: Locking a record with unpersisted changes is not supported

Fixes #350

For example, in case of a previous heartbeat failed because
of a DB issue (with SQLite depending on configuration, a
`BusyException` is not rare) and we still have the unpersisted
value in `last_heartbeat_at`, which means that `with_lock` will result
in:
```
RuntimeError: Locking a record with unpersisted changes is not supported
```

Fixes #350
@rosa rosa merged commit afff147 into main Sep 16, 2024
8 checks passed
@rosa rosa deleted the fix-lock-on-modified-record branch September 16, 2024 13:32
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.

Pessimistic lock errors with the heartbeat
1 participant