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

[extension/db_storage] Add transaction in batch operations #30551

Closed

Conversation

andrefrco
Copy link

@andrefrco andrefrco commented Jan 14, 2024

Description: When any batch operation fails, the db state should not be changed. To resolve this, the proposal is to add a transaction.

Link to tracking Issue: #29730

Testing: I found no reason why there are no client.go tests. So I decided to also create it for existing functions. If it doesn't make sense I can remove it.

When any batch operation fails, the db state should not be changed.
To resolve this, the proposal is to add a transaction.

Signed-off-by: andrefrco <[email protected]>
@andrefrco andrefrco requested a review from a team January 14, 2024 12:52
Copy link

linux-foundation-easycla bot commented Jan 14, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Jan 29, 2024
Copy link
Contributor

@atoulme atoulme left a comment

Choose a reason for hiding this comment

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

Changes look good. You might need a changelog entry. Is there a need to support toggling off transactions?

@github-actions github-actions bot removed the Stale label Jan 30, 2024
@andrefrco
Copy link
Author

Changes look good. You might need a changelog entry. Is there a need to support toggling off transactions?

Thanks @atoulme . I added the changelog entry.

I can't see in which use case we need to disable the transaction, we expect the entire batch to be processed or nothing. @dmitryax can help us with a second opinion?

@andrefrco
Copy link
Author

andrefrco commented Feb 6, 2024

I'll check the lint errors as soon as possible

Copy link
Contributor

github-actions bot commented Mar 6, 2024

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Mar 6, 2024
@dmitryax
Copy link
Member

dmitryax commented Mar 6, 2024

I can't see in which use case we need to disable the transaction, we expect the entire batch to be processed or nothing. @dmitryax can help us with a second opinion?

I agree. I don't think non-transactional behavior is desired at all

extension/storage/dbstorage/client.go Outdated Show resolved Hide resolved
extension/storage/dbstorage/client.go Outdated Show resolved Hide resolved
@github-actions github-actions bot removed the Stale label Mar 7, 2024
@andrefrco andrefrco requested a review from dmitryax March 18, 2024 22:56
Copy link
Contributor

github-actions bot commented Apr 2, 2024

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Apr 2, 2024
Copy link
Contributor

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants