Skip to content

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
@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

2 participants