incubator-seata-go icon indicating copy to clipboard operation
incubator-seata-go copied to clipboard

optimize: support instance BusinessActionContext outside the TCC try …

Open luky116 opened this issue 1 year ago • 2 comments

…method

What this PR does:

  1. During the prepare method of TCC, users can manually pass in BusinessActionContext parameters to facilitate user-defined parameters
  2. TwoPhaseAction interface’s prepare function parameters change from Prepare(ctx context.Context, params ...interface{}) (bool, error) to Prepare(ctx context.Context, params interface{}) (bool, error), for easy to parse parameters

Which issue(s) this PR fixes:

Fixes #178

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


luky116 avatar Aug 03 '22 16:08 luky116

pls fix the confliction.

AlexStocks avatar Aug 12 '22 12:08 AlexStocks

Codecov Report

Merging #179 (7f9da7b) into master (5e42d8e) will increase coverage by 2.68%. The diff coverage is 81.89%.

@@            Coverage Diff             @@
##           master     #179      +/-   ##
==========================================
+ Coverage   61.61%   64.29%   +2.68%     
==========================================
  Files          48       48              
  Lines        1941     2028      +87     
==========================================
+ Hits         1196     1304     +108     
+ Misses        687      660      -27     
- Partials       58       64       +6     
Impacted Files Coverage Δ
pkg/tm/context.go 77.77% <ø> (ø)
pkg/rm/two_phase.go 67.57% <40.00%> (-2.47%) :arrow_down:
pkg/rm/tcc/tcc_service.go 65.40% <85.84%> (+65.40%) :arrow_up:
pkg/rm/tcc/tcc_resource.go 37.89% <0.00%> (+8.42%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov-commenter avatar Aug 12 '22 15:08 codecov-commenter