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

Add support for transaction chaining. #216

Open
je-ik opened this issue May 17, 2021 · 1 comment
Open

Add support for transaction chaining. #216

je-ik opened this issue May 17, 2021 · 1 comment

Comments

@je-ik
Copy link
Collaborator

je-ik commented May 17, 2021

When multiple attributes with different types of TransactionModes are part of the same transaction, we need to delegate the commit to individual attributes to sub-transaction managers. The transaction will happen with the highest mode from all attributes, but the top-most manager will verify only integrity of the highest-level mode attributes. The lower level need to be delegated to appropriate managers. All calls (open, update, commit, abort) then have to follow this algorithm:

  • perform the operation within the current transaction manager, if the operation fails
    • if there are any open downstream transactions, abort them
    • return failure to the client
  • otherwise, check if there are any downstream managers
  • if yes, send the operation (open, update, commit, abort) to all downstream managers and gather responses
    • if any fails, return failure, rollback all
    • otherwise, return success to the client

Subtask of #198

@je-ik
Copy link
Collaborator Author

je-ik commented May 17, 2021

Keep all open downstream transactions within state of the current transaction.

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

No branches or pull requests

1 participant