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

Potential inconsistances with propagation outside of transaction #1129

Open
GeoffreyHuck opened this issue Jul 24, 2024 · 3 comments
Open

Potential inconsistances with propagation outside of transaction #1129

GeoffreyHuck opened this issue Jul 24, 2024 · 3 comments
Labels
Definition in Progress Issue definition not completed Status: Blocked

Comments

@GeoffreyHuck
Copy link
Contributor

GeoffreyHuck commented Jul 24, 2024

Creating this issue to address this potential problem

Originally posted by @zenovich in #1099 (comment)

          **The main thing:**

If we schedule a propagation outside of a transaction, we cannot guarantee that data modifications already committed to the DB will be followed by a corresponding scheduled propagation. Indeed, let's consider a situation where, for instance, an AWS Lamba function processing a user request gets killed because of a timeout right after it has committed the data modifications to the DB, but before it has called another AWS Lambda function to trigger the propagation.

Such situations are really dangerous and hard to debug. They will definitely lead to production failures and DB inconsistency issues.

I would think 100500 times before doing this and finally would find another approach.

@GeoffreyHuck
Copy link
Contributor Author

@zenovich in your example:

  1. The propagation is run outside the transaction, but the transaction itself commits the data updates as well as the markers required for the propagation to put the database in a consistent state again.
  2. The DB is only in a temporary inconsistent state that will be corrected once the propagation is run again.

Are those correct? If yes, I think we can close the issue. If not, please tell me why.

@smadbe smadbe added Status: Blocked Definition in Progress Issue definition not completed labels Jul 24, 2024
@zenovich
Copy link
Collaborator

zenovich commented Aug 3, 2024

The DB is only in a temporary inconsistent state that will be corrected once the propagation is run again.

This "temporary inconsistent state" can be very dangerous.

@zenovich
Copy link
Collaborator

zenovich commented Aug 5, 2024

like here: #1149

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Definition in Progress Issue definition not completed Status: Blocked
Projects
None yet
Development

No branches or pull requests

3 participants