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

Reuse transaction #6260

Merged
merged 1 commit into from Feb 5, 2021
Merged

Reuse transaction #6260

merged 1 commit into from Feb 5, 2021

Conversation

Zelldon
Copy link
Member

@Zelldon Zelldon commented Feb 5, 2021

Description

Instead of relying of the implementation that it resets the transaction on rollback or commit, we renew the transaction via #beginTransaction .

Related issues

closes #2397

Definition of Done

Not all items need to be done depending on the issue and the pull request.

Code changes:

  • The changes are backwards compatibility with previous versions
  • If it fixes a bug then PRs are created to backport the fix to the last two minor versions. You can trigger a backport by assigning labels (e.g. backport stable/0.25) to the PR, in case that fails you need to create backports manually.

Testing:

  • There are unit/integration tests that verify all acceptance criterias of the issue
  • New tests are written to ensure backwards compatibility with further versions
  • The behavior is tested manually
  • The change has been verified by a QA run
  • The impact of the changes is verified by a benchmark

Documentation:

  • The documentation is updated (e.g. BPMN reference, configuration, examples, get-started guides, etc.)
  • New content is added to the release announcement

@Zelldon Zelldon requested a review from npepinpe February 5, 2021 06:32
Copy link
Member

@npepinpe npepinpe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate on the choice to add a new interface instead of making renew (or refresh or whatever) be part of the Transaction behaviour itself?

@Zelldon
Copy link
Member Author

Zelldon commented Feb 5, 2021

Not sure whether I get your question right. Is the question why the interface is not part of the Transaction or why I not have added a reference to the db, such that it can reuse the transaction? Maybe for clarity to begin a transaction you need to have access to the database.

@npepinpe
Copy link
Member

npepinpe commented Feb 5, 2021

Ah, I thought Transaction was from our code base 🙈 Nevermind 😅

Copy link
Member

@npepinpe npepinpe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@Zelldon
Copy link
Member Author

Zelldon commented Feb 5, 2021

bors r+

@zeebe-bors
Copy link
Contributor

zeebe-bors bot commented Feb 5, 2021

Build succeeded:

@zeebe-bors zeebe-bors bot merged commit 7fe803b into develop Feb 5, 2021
@zeebe-bors zeebe-bors bot deleted the zell-2397-new-transaction branch February 5, 2021 15:07
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.

Reusing transaction with help of beginTransaction might be safer
2 participants