Skip to content

Conversation

@awrichar
Copy link
Contributor

@awrichar awrichar commented Oct 20, 2021

If a transaction is already started, it is reused.

This allows code to be reused in a fashion where it may need to start a transaction, or may be called from
within an already-started transaction (useful for operations that span multiple packages, such as the
ongoing work on token transfers with associated messages).

It does introduce a new constraint for database implementations (noted in the database plugin definition).

@codecov-commenter
Copy link

codecov-commenter commented Oct 20, 2021

Codecov Report

Merging #270 (2a5235f) into main (40dfd8b) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 2a5235f differs from pull request most recent head 1633edb. Consider uploading reports for the commit 1633edb to get more accurate results
Impacted file tree graph

@@            Coverage Diff            @@
##              main      #270   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          217       217           
  Lines        12315     12317    +2     
=========================================
+ Hits         12315     12317    +2     
Impacted Files Coverage Δ
internal/database/sqlcommon/sqlcommon.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 40dfd8b...1633edb. Read the comment docs.

If a transaction is already started, it is reused.

Signed-off-by: Andrew Richardson <[email protected]>
Copy link
Contributor

@peterbroadhurst peterbroadhurst left a comment

Choose a reason for hiding this comment

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

👍 - thanks for thinking it through, and adding the extra clarifications.

@peterbroadhurst peterbroadhurst merged commit 3bc23f3 into hyperledger:main Oct 20, 2021
@peterbroadhurst peterbroadhurst deleted the group branch October 20, 2021 16:24
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.

3 participants