CECTC / dbpack

A db proxy for distributed transaction, read write splitting and sharding! Support any language! It can be deployed as a sidecar in a pod.
https://cectc.github.io/dbpack-doc/#/en-us/
Apache License 2.0
356 stars 46 forks source link

in sharding mode, support local transaction #255

Closed dk-lockdown closed 2 years ago

dk-lockdown commented 2 years ago

ref: https://github.com/cectc/dbpack/issues/236

Ⅰ. Describe what this PR did

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

image

Check the result, update rollbacked. image

Ⅴ. Special notes for reviews

codecov-commenter commented 2 years ago

Codecov Report

Merging #255 (3a1754b) into dev (59b9ff1) will decrease coverage by 0.38%. The diff coverage is 2.50%.

:exclamation: Current head 3a1754b differs from pull request most recent head 77d9c3d. Consider uploading reports for the commit 77d9c3d to get more accurate results

@@            Coverage Diff             @@
##              dev     #255      +/-   ##
==========================================
- Coverage   43.77%   43.38%   -0.39%     
==========================================
  Files          82       82              
  Lines        9885     9980      +95     
==========================================
+ Hits         4327     4330       +3     
- Misses       5106     5196      +90     
- Partials      452      454       +2     
Impacted Files Coverage Δ
pkg/executor/read_write_splitting.go 46.30% <0.00%> (-0.23%) :arrow_down:
pkg/plan/delete.go 6.55% <0.00%> (-0.72%) :arrow_down:
pkg/plan/insert.go 38.18% <0.00%> (-11.82%) :arrow_down:
pkg/plan/query.go 34.02% <0.00%> (-2.45%) :arrow_down:
pkg/plan/update.go 9.52% <0.00%> (-1.01%) :arrow_down:
pkg/executor/sharding.go 38.09% <7.69%> (-8.30%) :arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more