generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use db clock for delaying event consumption (#1727)
We have a small delay between when a topic event is published and when we allow subscriptions to consume it to guarantee no new events will be inserted in-between. Previously this check was done by the controller, comparing the db row's created_at with the controller's clock. It seems there are cases where the controller thinks that enough time has passed, but not according to the db clock. This PR moves these checks to the db layer. This should make our integration test more reliable as it also relies on comparing two timestamps generated by the db clock. Example flaky integration test: https://github.com/TBD54566975/ftl/actions/runs/9432792904/job/25983007930#step:8:1
- Loading branch information
Showing
4 changed files
with
18 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.