Compare commits

...

124 Commits

Author SHA1 Message Date
jimin fa8d3a19a4
format style (#599) 2023-05-12 18:21:38 +08:00
jimin 3058fceb50
replace image (#598) 2023-05-12 18:11:17 +08:00
jimin 40157f2554
add community refer url (#597) 2023-05-12 17:48:45 +08:00
jimin d8c9e2950c
add seata summer code 2023 (#596) 2023-05-12 17:14:42 +08:00
jimin 53e0670de1
optimize: optimize microservice landscape for safari and mobile (#595)
Signed-off-by: slievrly <slievrly@163.com>
2023-04-18 16:17:53 +08:00
jimin 24149eee8c
optimize: optimize SCA in microservice landscape (#594)
Signed-off-by: slievrly <slievrly@163.com>
2023-04-13 15:11:31 +08:00
jimin 39ffaf8fc0
optimize: update workflow runner label (#592) 2023-04-07 11:00:45 +08:00
jimin 0705b41f49
update security doc (#590) 2023-04-07 00:07:43 +08:00
xiaowu ca2507ff40
bugfix: the configuration about high availability with docker compose (#585) 2023-04-05 23:42:23 +08:00
FUNKYE 42ebd9b1e2
update domain model overview (#589) 2023-04-02 15:42:34 +08:00
FUNKYE ef36c4fcaa
add domain model overview (#588) 2023-04-01 22:02:15 +08:00
FUNKYE 7d8562c44f
New domain model module documentation structure (#587) 2023-04-01 17:44:01 +08:00
FUNKYE aa1556ee26
Modify acquire lock timeout solution description (#586) 2023-04-01 17:43:45 +08:00
jimin a57a0ba94d
optimize: fix docsite/docusaurus lang cookie (#583)
Signed-off-by: slievrly <slievrly@163.com>
2023-03-22 10:24:54 +08:00
jimin 98ee811456
optimize: update contacts (#582)
Signed-off-by: slievrly <slievrly@163.com>
2023-03-17 01:07:26 +08:00
jimin 0324090ccb
optimize: revised English version of microservice landscape (#581)
Signed-off-by: slievrly <slievrly@163.com>
2023-03-11 11:04:48 +08:00
jimin 1786eb0908
optimize: compatible with mobile and Safari browser (#579)
Signed-off-by: slievrly <slievrly@163.com>
2023-03-06 14:00:28 +08:00
jimin b47b186b1f
bugfix: fix saga statemachine designer 404 (#577)
Signed-off-by: slievrly <slievrly@163.com>
2023-03-02 00:32:52 +08:00
jimin fb3407c3e4
optimize: revised English version (#576)
Signed-off-by: slievrly <slievrly@163.com>
2023-02-28 10:54:26 +08:00
zhangjiawei c11a145d5c change company 2023-02-28 10:25:20 +08:00
jimin 9bc5cb4ae7
optimize: replace spring cloud alibaba logo (#575)
Signed-off-by: slievrly <slievrly@163.com>
2023-02-28 10:11:31 +08:00
jimin a0353c1712
optimize: fix tcc desc error (#574)
Signed-off-by: slievrly <slievrly@163.com>
2023-02-27 23:37:48 +08:00
jimin 9406d5c9bb
optimize: update sitemap.xml (#573)
Signed-off-by: slievrly <slievrly@163.com>
2023-02-27 22:46:36 +08:00
jimin 26cd27cbb9
optimize: add sofa site (#572)
Signed-off-by: slievrly <slievrly@163.com>
2023-02-27 22:46:03 +08:00
jimin 13223e0f9f
optimize: fix microservice landscape route handoff (#570)
Signed-off-by: slievrly <slievrly@163.com>
2023-02-27 14:36:21 +08:00
jimin fe7aea545c
optimize: update microservice ecosystem landscape to 0.0.10 (#569)
Signed-off-by: slievrly <slievrly@163.com>
2023-02-24 09:43:59 +08:00
renliangyu857 a55f295d37
update developer doc (#568) 2023-02-18 11:10:55 +08:00
jimin 7c06674b45
optimize: update microservice ecosystem landscape to 0.0.9 (#567)
Signed-off-by: slievrly <slievrly@163.com>
2023-02-17 10:06:56 +08:00
jimin 4def8271a1
optimize: update microservice ecosystem landscape (#565) 2023-02-09 19:18:05 +08:00
jimin 09bd0323cb
optimize: upgrade microservice landscape support en-us (#564)
Signed-off-by: slievrly <slievrly@163.com>
2023-02-09 18:30:42 +08:00
halo bear c5f1b057c8
bugfix: fix incomplete document display (#563) 2023-02-09 18:20:12 +08:00
jimin f994399836
optimize: update sitemap (#559) 2023-02-02 20:53:54 +08:00
jimin 281af01699
optimize: add redirect index.html (#558) 2023-02-02 20:28:39 +08:00
jimin cbf16bd009
optimize: add default page (#557) 2023-02-02 19:53:51 +08:00
jimin 60d9db5f3b
optimize: fix broken link (#556)
Signed-off-by: slievrly <slievrly@163.com>
2023-02-02 19:38:40 +08:00
jimin dab8cf850b
optimize: optimize site.js (#554)
Signed-off-by: slievrly <slievrly@163.com>
2023-02-02 13:27:08 +08:00
jimin ec4e53a053
optimize: optimize microservice support doc (#553) 2023-02-01 22:20:41 +08:00
jimin 1c9e6bb1fa
optimize: optimize spider grab content (#552)
Signed-off-by: slievrly <slievrly@163.com>
2023-02-01 21:48:19 +08:00
jimin e31025b4f2
optimize: fix search engine get url dead link (#551)
Signed-off-by: slievrly <slievrly@163.com>
2023-02-01 21:11:16 +08:00
jimin da14b63952
optimize: add robots.txt (#548)
Signed-off-by: slievrly <slievrly@163.com>
2023-02-01 14:10:29 +08:00
jimin 2fefb0b316
optimize: update site.txt (#546)
Signed-off-by: slievrly <slievrly@163.com>
2023-02-01 00:42:29 +08:00
jimin 4f1335bbee
optimize: update sitemap.xml (#545)
Signed-off-by: slievrly <slievrly@163.com>
2023-01-31 22:35:48 +08:00
jimin be41c2ea5c
optimize: add 1.5.2 in blog (#544) 2023-01-31 22:08:28 +08:00
jimin 454bfd74d3
optimize: update blog (#543) 2023-01-31 21:17:43 +08:00
jimin bdc405bdf3
blog: add seata 1.6.0 in blog (#542) 2023-01-31 20:52:18 +08:00
jimin e20bf81d57
optimize: update developers_dev.md (#540)
Signed-off-by: slievrly <slievrly@163.com>
2023-01-31 20:27:56 +08:00
liuqiufeng f1d23d1ba8
optimize: modify multi pk doc (#537) 2023-01-28 17:38:46 +08:00
jimin 74d481e5db
optimize: deploy to OSS every 12 hours (#536) 2023-01-19 15:23:39 +08:00
jimin 1bcb58c1cd
optimize: add etag (#535) 2023-01-10 20:27:00 +08:00
jimin a2219d179c
optimize: remove microservice landscape const (#534) 2023-01-09 17:03:52 +08:00
jimin 1c81b1a63b
bugfix: add *.txt *.xml in deploy-dist (#530) 2023-01-09 14:39:15 +08:00
jimin 75c624cb3f
bugfix: fix docs content rollback during deployment (#529) 2023-01-09 14:23:06 +08:00
kwtboom 04d241e6fe
update:mse-arc to 0.0.6 (#527) 2023-01-09 12:45:02 +08:00
FUNKYE bace4fac8e
change js.cookie.min.js cdn address (#526) 2023-01-08 01:40:11 +08:00
kwtboom ca578ec9b2
update:升级mse-arc兼容safari&mobile (#525)
* feat:微服务全景图

* update:升级mse-arc兼容safari&mobile
2023-01-06 14:27:59 +08:00
澄潭 7a81176404
Update deploy-oss.yml (#524) 2023-01-05 14:21:36 +08:00
澄潭 f9ef2103b3
add oss deploy ci (#519) 2023-01-05 11:35:24 +08:00
jimin 134c433058
add recruitment (#523) 2023-01-03 20:38:19 +08:00
kwtboom 1299c30595
feat: microservice landscape (#522) 2022-12-30 16:57:59 +08:00
jimin a3d3e0b6fa
remove copyright header for SEO (#521) 2022-12-27 12:39:19 +08:00
jimin ceb5980cff
optimize SEO keywords (#520) 2022-12-27 11:58:01 +08:00
jimin 4d504790f7
add 1.6.1 release notes (#518) 2022-12-27 01:14:52 +08:00
jimin f21af86e76
upgrade latest version (#517) 2022-12-24 23:51:20 +08:00
jimin 7d51c7cf3b
upgrade saga-statemachine-designer (#516) 2022-12-21 18:32:02 +08:00
jimin c08c0e4124
add upgrade 1.6.0 notice (#515) 2022-12-20 00:28:19 +08:00
jimin 880e533579
add 1.6.0 release notes contributors (#514) 2022-12-19 22:23:11 +08:00
jimin 8c17837f9b
add 1.6.0 release notes (#513) 2022-12-19 17:47:13 +08:00
renliangyu857 b87072476c
optimize configuration doc (#512) 2022-12-19 16:48:47 +08:00
xingfudeshi 193818d7a0
add update join doc (#511) 2022-12-06 15:32:13 +08:00
sunyl-git 43c6d69c83
Update faq.md (#510) 2022-12-01 16:27:32 +08:00
xingfudeshi 560d52d1b7
fix typo errors (#506) 2022-11-22 12:01:51 +08:00
jimin f3c0648afa
update FAQ (#505) 2022-11-21 23:08:19 +08:00
jimin 1267cf3cad
optimize SEO keywords (#502) 2022-11-10 21:17:59 +08:00
jimin dcddf87d65
update license notice (#501) 2022-11-08 12:14:04 +08:00
jimin 31c5f51cb9
add license checker (#499) 2022-11-08 12:05:24 +08:00
jimin 40dbc64114
optimize statistic js (#497) 2022-11-03 12:27:13 +08:00
jimin 619bc2626d
add license (#496) 2022-10-26 22:49:32 +08:00
jimin cd447844b7
fix js.cookie.min.js load pending (#495) 2022-10-22 17:08:30 +08:00
jimin 7cee81becd
add statistic for website(#493) 2022-10-14 13:30:46 +08:00
qingtingduizhang 70682bb29a
fix typo in deploy-by-docker-compose (#492) 2022-09-29 11:51:46 +08:00
ZhangCheng 7b91534ae7
fix typo (#490) 2022-09-21 14:17:22 +08:00
梦想实现家 b266608ab9
fix history link for deploy by docker compose (#489) 2022-09-07 16:40:12 +08:00
梦想实现家 e13ad70ab4
add docker compose deploy mode for seata server 1.5.0 or later (#488) 2022-09-07 10:57:10 +08:00
jimin bd71fe8876
add google analytics (#485) 2022-09-01 20:07:41 +08:00
Ron Robyn ac07f91b57
fix summary metrics (#484) 2022-09-01 20:06:08 +08:00
jimin 7d43213c5a
update online ggeditor (#482) 2022-08-15 17:34:30 +08:00
TanzJ 045ae1003e
update script dir path (#480) 2022-07-26 01:17:52 +08:00
jimin 6847509593
update Kubernetes for Seata (#479) 2022-07-24 00:06:17 +08:00
jimin d996dbfb54
update logo (#478)
Signed-off-by: slievrly <slievrly@163.com>
2022-07-14 12:40:42 +08:00
jimin 29c0c7af14
update 1.5.2 releaseNotes (#477)
Signed-off-by: slievrly <slievrly@163.com>
2022-07-13 13:48:31 +08:00
TanzJ 8b76cd9824
update 1.5.x's upgrade guide (#474) 2022-06-29 00:59:57 +08:00
jinjunzhu 3ea74c7110
seata-tcc-fence add header (#473) 2022-06-25 16:18:50 +08:00
jinjunzhu 2b4dd426d2
blog:seata-tcc-fence (#471) 2022-06-25 15:13:32 +08:00
FUNKYE b3a9f8bbab
update faq.md (#469) 2022-06-21 23:48:44 +08:00
jimin 783c670381
update navigation url (#468)
Signed-off-by: slievrly <slievrly@163.com>
2022-06-19 00:03:58 +08:00
jimin f7edc9eb6c
FAQ for db store (#467)
Signed-off-by: slievrly <slievrly@163.com>
2022-06-07 20:22:25 +08:00
jimin f3ef209aff
optimize upgrade doc (#466) 2022-06-07 15:49:29 +08:00
jimin 0f83584b64
resize imgUrl (#465) 2022-06-02 19:26:42 +08:00
jimin bb3a2f7c26
add imgUrl (#464) 2022-06-02 18:50:59 +08:00
jimin a1aff7a48a
add navigation url (#463)
Signed-off-by: slievrly <slievrly@163.com>
2022-06-02 18:35:29 +08:00
FUNKYE a849d6632b
update developers_dev.md (#462) 2022-06-01 20:36:04 +08:00
Yuedong Wu 81ca80bc29
update zh-cn blogs (#460) 2022-06-01 20:33:22 +08:00
FUNKYE 99e4ee067d
update developers_dev.md (#461) 2022-06-01 20:32:21 +08:00
jimin 02941ecf64
add 1.5.1 release notes (#459)
Signed-off-by: slievrly <slievrly@163.com>
2022-05-31 14:45:44 +08:00
FUNKYE c24ea80f7b
update js.cookie.min.js (#458) 2022-05-24 00:13:22 +08:00
FUNKYE 229c91d137
update deploy-by-docker.md (#457) 2022-05-23 22:36:09 +08:00
justabug d842b7134d
deploy by docker (#456) 2022-05-23 14:22:58 +08:00
TanzJ b4a6004054
update pic-bed's pics to local (#455) 2022-05-18 16:41:29 +08:00
FUNKYE 155d8ad99a
update deploy-guide-beginner.md (#454) 2022-05-17 23:20:11 +08:00
FUNKYE a247828939
update spring.md (#453) 2022-05-17 22:52:53 +08:00
jimin 55b49ff26f
update seata in cloud url (#452)
Signed-off-by: slievrly <slievrly@163.com>
2022-05-17 16:29:11 +08:00
FUNKYE 7dd375e439
update site.js (#451) 2022-05-16 21:53:04 +08:00
FUNKYE 2dc9029ee2
update upgrade.md (#450) 2022-05-15 23:43:11 +08:00
chd fb2f5e6eb1
Update developers_dev.md (#449) 2022-05-14 22:00:28 +08:00
liuqiufeng 2995a48ead
bugfix:Fix word spelling errors (#448) 2022-05-13 23:21:47 +08:00
FUNKYE 8b4df5beb4
update faq (#446) 2022-05-04 15:20:29 +08:00
FUNKYE 8f83ce0f20
update faq (#445) 2022-05-03 23:12:45 +08:00
FUNKYE 45739195bd
update configuration (#444) 2022-04-28 22:32:16 +08:00
FUNKYE c7d94c662e
update home.jsx (#443) 2022-04-28 22:15:28 +08:00
Ron Robyn 323d0fa3d6
FAQ: resolve pom dependencies when using Apple M1 (#442) 2022-04-13 14:32:39 +08:00
jimin ddd11b3137
update home and contributor page (#441) 2022-04-12 15:31:00 +08:00
jimin c76e6c8c29
optimize: update contributor (#439)
Signed-off-by: slievrly <slievrly@163.com>
2022-04-12 11:45:40 +08:00
pengten dcc303d554
Fix some wrong in the sql-restrictions (#407)
* fix some wrong in the sql-restrictions

* fix some wrong in the sql-restrictions

* fix some wrong in the sql-restrictions

* Update sql-restrictions.md

修改测试结论

* Update sql-restrictions.md
2022-04-08 10:09:07 +08:00
lvekee 1bde5efdae
fix (#437) 2022-04-07 22:23:48 +08:00
84 changed files with 5927 additions and 973 deletions

20
.github/workflows/deploy-oss.yml vendored Normal file
View File

@ -0,0 +1,20 @@
name: seata.io deploy on oss
on:
push:
branches:
- master
jobs:
Build-Deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Use Node.js 12.x
uses: actions/setup-node@v2
with:
node-version: 12.x
- run: npm i @serverless-devs/s -g --registry=https://registry.npmmirror.com
- run: s config add --AccountID ${{secrets.ACCOUNT_ID}} --AccessKeyID ${{secrets.ACCESS_KEYID}} --AccessKeySecret ${{secrets.ACCESS_KEYSECRET}} -a seata -f
- name: Deploy
run: s deploy --use-local -y

View File

@ -3,11 +3,14 @@ name: seata.io deploy
on:
push:
branches:
- develop
- develop
#This schedule only takes effect in the default branch
schedule:
- cron: '0 */12 * * *'
jobs:
Build-Deploy:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
@ -17,7 +20,7 @@ jobs:
node-version: 10.x
- name: Build
run: |
npm install && npm run build && mkdir deploy-dist && cp -R zh-cn/ en-us/ build/ img/ md_json/ site_config/ schema/ deploy-dist/ && mv .htaccess *.html deploy-dist/
npm install && npm run build && mkdir deploy-dist && cp -R zh-cn/ en-us/ build/ img/ md_json/ site_config/ schema/ saga_designer/ deploy-dist/ && mv .htaccess *.html *.txt *.xml deploy-dist/
- name: Deploy
uses: peaceiris/actions-gh-pages@v2.8.0
env:

20
.github/workflows/license-checker.yaml vendored Normal file
View File

@ -0,0 +1,20 @@
name: License checker
on:
pull_request:
branches: [ develop, master ]
jobs:
check-license:
runs-on: ubuntu-latest
steps:
# step 1
- name: Checkout
uses: actions/checkout@v2.4.0
# step 2
- name: Check Dependencies' License
uses: apache/skywalking-eyes/dependency@25edfc2fd8d52fb266653fb5f6c42da633d85c07
with:
log: info
config: .licenserc.yaml
mode: check

View File

@ -1,4 +1,5 @@
DirectoryIndex index.html
FileETag MTime Size
<IfModule mod_expires.c>
ExpiresActive On

52
.licenserc.yaml Normal file
View File

@ -0,0 +1,52 @@
header:
license:
spdx-id: Apache-2.0
copyright-owner: Seata.io
content: |
Copyright 1999-2019 Seata.io Group.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
paths-ignore:
- '.gitignore'
- '*.md'
- 'LICENSE'
- '**/*.md'
- '.github/**'
- '.babelrc'
- '.docsite'
- '.eslintrc'
- '.htaccess'
- '.nojekyll'
- '404.html'
- 'CNAME'
- 'img/**'
- '**/*.json'
- '**/*.js'
- '**/*.css'
- '**/*.jsx'
- '**/*.scss'
- 'server'
- '**/*.svg'
- '*.ejs'
- '*.xml'
- '*.yml'
- '*.yaml'
- '*.map'
- 'saga_designer/**'
comment: on-failure
dependency:
files:
- package.json

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8">
</head>
<body>
<script src="//cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/js-cookie/3.0.1/js.cookie.min.js"></script>
<script>
window.rootPath = '';
window.defaultLanguage = 'en-us';
@ -12,7 +12,7 @@
if (!lang) {
lang = 'en-us';
}
window.location = window.rootPath + '/' + lang;
window.location = window.rootPath + '/' + lang +'/index.html';
</script>
</body>
</html>

195
LICENSE Normal file
View File

@ -0,0 +1,195 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
========================================================================
MIT licenses
========================================================================
classnames 2.2.6 MIT
core-decorators 0.20.0 MIT
js-cookie 2.2.0 MIT
js-tokens 4.0.0 MIT
lodash.throttle 4.1.1 MIT
loose-envify 1.4.0 MIT
object-assign 4.1.1 MIT
prop-types 15.7.2 MIT
react 16.5.2 MIT
react-dom 16.5.2 MIT
react-is 16.8.3 MIT
react-scroll 1.7.11 MIT
schedule 0.5.0 MIT
whatwg-fetch 2.0.4 MIT

View File

@ -8,7 +8,7 @@ All website material of https://seata.io
## Prerequisite
seata.github.io is powered by [docsite](https://github.com/txd-team/docsite).please read [https://docsite.js.org](https://docsite.js.org)
If your version of docsite is less than `1.3.3`, please upgrade to `1.3.3`.
If your version of docsite is less than `1.3.3`, please upgrade to at least `1.3.3`,`1.3.8` is recommended.
Please also make sure your node version is 8.x, versions higher than 8.x is not supported by docsite yet.
## Build instruction

View File

@ -12,6 +12,596 @@ description: This article will introduce you how to understand the details of ea
> GitHub: https://github.com/seata/seata \
> Release Notes: https://github.com/seata/seata/releases
### 1.6.1 (2022-12-21)
[source](https://github.com/seata/seata/archive/v1.6.1.zip) |
[binary](https://github.com/seata/seata/releases/download/v1.6.1/seata-server-1.6.1.zip)
<details>
<summary><mark>Release notes</mark></summary>
### Seata 1.6.1
Seata 1.6.1 Released
Seata is an easy-to-use, high-performance, open source distributed transaction solution.
The version is updated as follows:
### feature:
- [[#5115](https://github.com/seata/seata/pull/5115)] support for `spring-boot:3.x`
### bugfix:
- [[#5179](https://github.com/seata/seata/pull/5179)] fix ClassNotFoundException when server starts using Eureka
### optimize:
- [[#5120](https://github.com/seata/seata/pull/5120)] unify the format of configuration items in yml files
- [[#5180](https://github.com/seata/seata/pull/5180)] GlobalTransactionScanner,SeataAutoDataSourceProxyCreator declare @bean methods as static
- [[#5182](https://github.com/seata/seata/pull/5182)] fix some security vulnerabilities in GGEditor
- [[#5183](https://github.com/seata/seata/pull/5183)] optimize the default values for some switches
Thanks to these contributors for their code commits. Please report an unintended omission.
<!-- Please make sure your Github ID is in the list below -->
- [slievrly](https://github.com/slievrly)
- [wangliang181230](https://github.com/wangliang181230)
- [xingfudeshi](https://github.com/xingfudeshi)
- [whxxxxx](https://github.com/whxxxxx)
- [xssdpgy](https://github.com/xssdpgy)
Also, we receive many valuable issues, questions and advices from our community. Thanks for you all.
#### Link
- **Seata:** https://github.com/seata/seata
- **Seata-Samples:** https://github.com/seata/seata-samples
- **Release:** https://github.com/seata/seata/releases
- **WebSite:** https://seata.io
</details>
### 1.6.0 (2022-12-17)
[source](https://github.com/seata/seata/archive/v1.6.0.zip) |
[binary](https://github.com/seata/seata/releases/download/v1.6.0/seata-server-1.6.0.zip)
<details>
<summary><mark>Release notes</mark></summary>
### Seata 1.6.0
Seata 1.6.0 Released
Seata is an easy-to-use, high-performance, open source distributed transaction solution.
The version is updated as follows:
### feature
- [[#4863](https://github.com/seata/seata/pull/4863)] support oracle and postgresql multi primary key
- [[#4649](https://github.com/seata/seata/pull/4649)] seata-server support multiple registry
- [[#4779](https://github.com/seata/seata/pull/4779)] support Apache Dubbo3
- [[#4479](https://github.com/seata/seata/pull/4479)] TCC mode supports tcc annotation marked on both interface and implementation class
- [[#4877](https://github.com/seata/seata/pull/4877)] seata client support jdk17
- [[#4914](https://github.com/seata/seata/pull/4914)] support mysql update join sql
- [[#4542](https://github.com/seata/seata/pull/4542)] support oracle timestamp types
- [[#5111](https://github.com/seata/seata/pull/5111)] support Nacos contextPath
- [[#4802](https://github.com/seata/seata/pull/4802)] dockerfile support arm64
### bugfix
- [[#4780](https://github.com/seata/seata/pull/4780)] fix can't post TimeoutRollbacked event after a successful timeout rollback
- [[#4954](https://github.com/seata/seata/pull/4954)] fix output expression incorrectly throws npe
- [[#4817](https://github.com/seata/seata/pull/4817)] fix in high version springboot property not Standard
- [[#4838](https://github.com/seata/seata/pull/4838)] fix when use Statement.executeBatch() can not generate undo log
- [[#4533](https://github.com/seata/seata/pull/4533)] fix rollback event repeated and some event status not correct
- [[#4912](https://github.com/seata/seata/pull/4912)] fix mysql InsertOnDuplicateUpdate column case is different and cannot be matched
- [[#4543](https://github.com/seata/seata/pull/4543)] fix support Oracle nclob types
- [[#4915](https://github.com/seata/seata/pull/4915)] fix failed to get server recovery properties
- [[#4919](https://github.com/seata/seata/pull/4919)] fix XID port and address null:0 before coordinator.init
- [[#4928](https://github.com/seata/seata/pull/4928)] fix rpcContext.getClientRMHolderMap NPE
- [[#4953](https://github.com/seata/seata/pull/4953)] fix InsertOnDuplicateUpdate bypass modify pk
- [[#4978](https://github.com/seata/seata/pull/4978)] fix kryo support circular reference
- [[#4874](https://github.com/seata/seata/pull/4874)] fix startup failure by using OpenJDK 11
- [[#5018](https://github.com/seata/seata/pull/5018)] fix loader path in startup scripts
- [[#5004](https://github.com/seata/seata/pull/5004)] fix duplicate image row for update join
- [[#5032](https://github.com/seata/seata/pull/5032)] fix mysql InsertOnDuplicateUpdate sql query error caused by placeholder index calculation error
- [[#5033](https://github.com/seata/seata/pull/5033)] fix null exception when sql columns is empty for insert on duplicate
- [[#5038](https://github.com/seata/seata/pull/5038)] remove @EnableConfigurationProperties({SagaAsyncThreadPoolProperties.class})
- [[#5050](https://github.com/seata/seata/pull/5050)] fix global session is not change to Committed in saga mode
- [[#5052](https://github.com/seata/seata/pull/5052)] fix update join condition placeholder param error
- [[#5031](https://github.com/seata/seata/pull/5031)] fix mysql InsertOnDuplicateUpdate should not use null index value as image sql query condition
- [[#5075](https://github.com/seata/seata/pull/5075)] fix InsertOnDuplicateUpdateExecutor could not intercept the sql which has no primary and unique key
- [[#5093](https://github.com/seata/seata/pull/5093)] fix access key loss after seata server restart
- [[#5092](https://github.com/seata/seata/pull/5092)] fix when seata and jpa are used together, their AutoConfiguration order is incorrect
- [[#5109](https://github.com/seata/seata/pull/5109)] fix NPE caused when there is no @GlobalTransactional annotation on the RM side
- [[#5098](https://github.com/seata/seata/pull/5098)] Druid disable oracle implicit cache
- [[#4860](https://github.com/seata/seata/pull/4860)] fix metrics tags coverage in the seata-server side
- [[#5028](https://github.com/seata/seata/pull/5028)] fix insert value null parsed as string in insert on duplicate SQL
- [[#5078](https://github.com/seata/seata/pull/5078)] fix could not intercept the sql witch has no primary and unique key
- [[#5097](https://github.com/seata/seata/pull/5097)] fix access key loss after server restart
- [[#5131](https://github.com/seata/seata/pull/5131)] fix rollback xa connection active state
- [[#5134](https://github.com/seata/seata/pull/5134)] fix hikari datasource auto proxy fail
- [[#5163](https://github.com/seata/seata/pull/5163)] fix bad service configuration file and compilation failure
### optimize
- [[#4774](https://github.com/seata/seata/pull/4774)] optimize mysql8 dependencies for seataio/seata-server image
- [[#4790](https://github.com/seata/seata/pull/4790)] Add a github action to publish Seata to OSSRH
- [[#4765](https://github.com/seata/seata/pull/4765)] mysql 8.0.29 not should be hold for connection
- [[#4750](https://github.com/seata/seata/pull/4750)] optimize unBranchLock romove xid
- [[#4797](https://github.com/seata/seata/pull/4797)] optimize the github actions
- [[#4800](https://github.com/seata/seata/pull/4800)] Add NOTICE as Apache License V2
- [[#4681](https://github.com/seata/seata/pull/4681)] optimize the check lock during global transaction
- [[#4761](https://github.com/seata/seata/pull/4761)] use hget replace hmget because only one field
- [[#4414](https://github.com/seata/seata/pull/4414)] exclude log4j dependencies
- [[#4836](https://github.com/seata/seata/pull/4836)] optimize BaseTransactionalExecutor#buildLockKey(TableRecords rowsIncludingPK) method more readable
- [[#4865](https://github.com/seata/seata/pull/4865)] fix some security vulnerabilities in GGEditor
- [[#4590](https://github.com/seata/seata/pull/4590)] auto degrade enable to dynamic configure
- [[#4490](https://github.com/seata/seata/pull/4490)] tccfence log table delete by index
- [[#4911](https://github.com/seata/seata/pull/4911)] add license checker workflow
- [[#4917](https://github.com/seata/seata/pull/4917)] upgrade package-lock.json fix vulnerabilities
- [[#4924](https://github.com/seata/seata/pull/4924)] optimize pom dependencies
- [[#4932](https://github.com/seata/seata/pull/4932)] extract the default values for some properties
- [[#4925](https://github.com/seata/seata/pull/4925)] optimize java doc warning
- [[#4921](https://github.com/seata/seata/pull/4921)] fix some vulnerabilities in console and upgrade skywalking-eyes
- [[#4936](https://github.com/seata/seata/pull/4936)] optimize read of storage configuration
- [[#4946](https://github.com/seata/seata/pull/4946)] pass the sqlexception to client when get lock
- [[#4962](https://github.com/seata/seata/pull/4962)] optimize build and fix the base image
- [[#4974](https://github.com/seata/seata/pull/4974)] optimize cancel the limit on the number of globalStatus queries in Redis mode
- [[#4981](https://github.com/seata/seata/pull/4981)] optimize tcc fence record not exists errMessage
- [[#4985](https://github.com/seata/seata/pull/4985)] fix undo_log id repeat
- [[#4995](https://github.com/seata/seata/pull/4995)] fix mysql InsertOnDuplicateUpdate duplicate pk condition in after image query sql
- [[#5047](https://github.com/seata/seata/pull/5047)] remove useless code
- [[#5051](https://github.com/seata/seata/pull/5051)] undo log dirty throw BranchRollbackFailed_Unretriable
- [[#5075](https://github.com/seata/seata/pull/5075)] intercept the InsertOnDuplicateUpdate statement which has no primary key and unique index value
- [[#5104](https://github.com/seata/seata/pull/5104)] remove the druid dependency in ConnectionProxy
- [[#5124](https://github.com/seata/seata/pull/5124)] support oracle on delete tccfence logs
- [[#4468](https://github.com/seata/seata/pull/4968)] support kryo 5.3.0
- [[#4807](https://github.com/seata/seata/pull/4807)] optimize docker image and oss publish
- [[#4445](https://github.com/seata/seata/pull/4445)] optimize transaction timeout judgment
- [[#4958](https://github.com/seata/seata/pull/4958)] do not execute triggerAfterCommit() if timeout
- [[#4582](https://github.com/seata/seata/pull/4582)] redis mode support sorted set by timeout
- [[#4963](https://github.com/seata/seata/pull/4963)] add ARM64 CI workflow
- [[#4434](https://github.com/seata/seata/pull/4434)] remove seata-server's CMS parameters
### test:
- [[#4411](https://github.com/seata/seata/pull/4411)] add UT for oracle in AT mode
- [[#4794](https://github.com/seata/seata/pull/4794)] try to fix the test `DataSourceProxyTest.getResourceIdTest()`
- [[#5101](https://github.com/seata/seata/pull/5101)] fix ClassNotFoundException during the zk unit test
Thanks to these contributors for their code commits. Please report an unintended omission.
<!-- Please make sure your Github ID is in the list below -->
- [slievrly](https://github.com/slievrly)
- [renliangyu857](https://github.com/renliangyu857)
- [wangliang181230](https://github.com/wangliang181230)
- [a364176773](https://github.com/a364176773)
- [tuwenlin](https://github.com/tuwenlin)
- [conghuhu](https://github.com/conghuhu)
- [a1104321118](https://github.com/a1104321118)
- [duanqiaoyanyu](https://github.com/duanqiaoyanyu)
- [robynron](https://github.com/robynron)
- [lcmvs](https://github.com/lcmvs)
- [github-ganyu](https://github.com/github-ganyu)
- [1181954449](https://github.com/1181954449)
- [zw201913](https://github.com/zw201913)
- [wingchi-leung](https://github.com/wingchi-leung)
- [AlexStocks](https://github.com/AlexStocks)
- [liujunlin5168](https://github.com/liujunlin5168)
- [pengten](https://github.com/pengten)
- [liuqiufeng](https://github.com/liuqiufeng)
- [yujianfei1986](https://github.com/yujianfei1986)
- [Bughue](https://github.com/Bughue)
- [AlbumenJ](https://github.com/AlbumenJ)
- [doubleDimple](https://github.com/doubleDimple)
- [jsbxyyx](https://github.com/jsbxyyx)
- [tuwenlin](https://github.com/tuwenlin)
- [CrazyLionLi](https://github.com/JavaLionLi)
- [whxxxxx](https://github.com/whxxxxx)
- [neillee95](https://github.com/neillee95)
- [crazy-sheep](https://github.com/crazy-sheep)
- [zhangzq7](https://github.com/zhangzq7)
- [l81893521](https://github.com/l81893521)
- [zhuyoufeng](https://github.com/zhuyoufeng)
- [xingfudeshi](https://github.com/xingfudeshi)
- [odidev](https://github.com/odidev)
- [miaoxueyu](https://github.com/miaoxueyu)
Also, we receive many valuable issues, questions and advices from our community. Thanks for you all.
#### Link
- **Seata:** https://github.com/seata/seata
- **Seata-Samples:** https://github.com/seata/seata-samples
- **Release:** https://github.com/seata/seata/releases
- **WebSite:** https://seata.io
</details>
### 1.5.2 (2022-07-12)
[source](https://github.com/seata/seata/archive/v1.5.2.zip) |
[binary](https://github.com/seata/seata/releases/download/v1.5.2/seata-server-1.5.2.zip)
<details>
<summary><mark>Release notes</mark></summary>
### Seata 1.5.2
Seata 1.5.2 Released.
Seata is an easy-to-use, high-performance, open source distributed transaction solution.
The version is updated as follows:
### feature
- [[#4661](https://github.com/seata/seata/pull/4713)] support xid load balance
- [[#4676](https://github.com/seata/seata/pull/4676)] support server to expose Nacos services by mounting SLB
- [[#4642](https://github.com/seata/seata/pull/4642)] support batch message parallel processing
- [[#4567](https://github.com/seata/seata/pull/4567)] support where method condition(find_in_set)
### bugfix
- [[#4515](https://github.com/seata/seata/pull/4515)] fix the error of SeataTCCFenceAutoConfiguration when database unused
- [[#4661](https://github.com/seata/seata/pull/4661)] fix sql exception with PostgreSQL in module console
- [[#4667](https://github.com/seata/seata/pull/4682)] fix the exception in RedisTransactionStoreManager for update map During iteration
- [[#4678](https://github.com/seata/seata/pull/4678)] fix the error of key transport.enableRmClientBatchSendRequest cache penetration if not configure
- [[#4701](https://github.com/seata/seata/pull/4701)] fix missing command line args
- [[#4607](https://github.com/seata/seata/pull/4607)] fix bug on skipping lock check
- [[#4696](https://github.com/seata/seata/pull/4696)] fix oracle database insert value
- [[#4726](https://github.com/seata/seata/pull/4726)] fix batch message send may return NullPointException
- [[#4729](https://github.com/seata/seata/pull/4729)] fix set AspectTransactional.rollbackForClassName with wrong value
- [[#4653](https://github.com/seata/seata/pull/4653)] fix the sql exception when pk is non-numeric in INSERT_ON_DUPLICATE SQL
### optimize
- [[#4650](https://github.com/seata/seata/pull/4650)] fix some security vulnerabilities
- [[#4670](https://github.com/seata/seata/pull/4670)] optimize the thread pool size of branchResultMessageExecutor
- [[#4662](https://github.com/seata/seata/pull/4662)] optimize rollback transaction metrics
- [[#4693](https://github.com/seata/seata/pull/4693)] optimize the console navigation bar
- [[#4700](https://github.com/seata/seata/pull/4700)] fix maven-compiler-plugin and maven-resources-plugin execute failed
- [[#4711](https://github.com/seata/seata/pull/4711)] separate lib dependencies for deployments
- [[#4720](https://github.com/seata/seata/pull/4720)] optimize pom description
- [[#4728](https://github.com/seata/seata/pull/4728)] upgrade logback dependency to 1.2.9
- [[#4745](https://github.com/seata/seata/pull/4745)] support mysql8 in release package
- [[#4626](https://github.com/seata/seata/pull/4626)] Replace `flatten-maven-plugin` with `easyj-maven-plugin` to fix the conflict between `shade` and `flatten`
- [[#4629](https://github.com/seata/seata/pull/4629)] check relation of before status and after status when updating global session
- [[#4662](https://github.com/seata/seata/pull/4662)] make EnhancedServiceLoader more readable
### test:
- [[#4544](https://github.com/seata/seata/pull/4544)] optimize jackson dependencies in TransactionContextFilterTest
- [[#4731](https://github.com/seata/seata/pull/4731)] fix UT failed in AsyncWorkerTest and LockManagerTest
Thanks to these contributors for their code commits. Please report an unintended omission.
<!-- Please make sure your Github ID is in the list below -->
- [slievrly](https://github.com/slievrly)
- [pengten](https://github.com/pengten)
- [YSF-A](https://github.com/YSF-A)
- [tuwenlin](https://github.com/tuwenlin)
- [Ifdevil](https://github.com/Ifdevil)
- [wingchi-leung](https://github.com/wingchi-leung)
- [liurong](https://github.com/robynron)
- [opelok-z](https://github.com/opelok-z)
- [a364176773](https://github.com/a364176773)
- [2129zxl](https://github.com/2129zxl)
- [Smery-lxm](https://github.com/Smery-lxm)
- [doubleDimple](https://github.com/doubleDimple)
- [wangliang181230](https://github.com/wangliang181230)
- [Bughue](https://github.com/Bughue)
- [AYue-94](https://github.com/AYue-94)
- [lingxiao-wu](https://github.com/lingxiao-wu)
- [caohdgege](https://github.com/caohdgege)
Also, we receive many valuable issues, questions and advices from our community. Thanks for you all.
#### Link
- **Seata:** https://github.com/seata/seata
- **Seata-Samples:** https://github.com/seata/seata-samples
- **Release:** https://github.com/seata/seata/releases
- **WebSite:** https://seata.io
</details>
### 1.5.1 (2021-05-17)
[source](https://github.com/seata/seata/archive/v1.5.1.zip) |
[binary](https://github.com/seata/seata/releases/download/v1.5.1/seata-server-1.5.1.zip)
<details>
<summary><mark>Release notes</mark></summary>
### feature
- [[#4115](https://github.com/seata/seata/pull/4115) ] support console management
- [[#3472](https://github.com/seata/seata/pull/3472) ] add redisLocker's lua mode
- [[#3575](https://github.com/seata/seata/pull/3575) ] support the mixed use of different storages of locks and sessions
- [[#3374](https://github.com/seata/seata/pull/3374) ] add a Executor for INSERT ON DUPLICATE KEY UPDATE
- [[#3642](https://github.com/seata/seata/pull/3642) ] provide an api to share tcc phase-1's params to phase-2
- [[#3064](https://github.com/seata/seata/pull/3064) ] support configuring the order of the TM and TCC interceptor
- [[#2852](https://github.com/seata/seata/pull/2852) ] support configuring scan target for GlobalTransactionScanner
- [[#3683](https://github.com/seata/seata/pull/3683) ] support redis distributed lock to prevent multi TC competition
- [[#3545](https://github.com/seata/seata/pull/3545) ] TCC mode support idempotent and anti hanging
- [[#3009](https://github.com/seata/seata/pull/3009) ] support server start with springboot and config with application.yaml
- [[#3652](https://github.com/seata/seata/pull/3652) ] support APM with SkyWalking
- [[#3823](https://github.com/seata/seata/pull/3823) ] TCC mode supports customized parameters list of the method in phase two
- [[#3642](https://github.com/seata/seata/pull/3642) ] TCC mode's try method supports passing `BusinessActionContext` implicitly
- [[#3856](https://github.com/seata/seata/pull/3856) ] support edas-hsf RPC framework
- [[#3880](https://github.com/seata/seata/pull/3880) ] contributing md support chinese.
- [[#2568](https://github.com/seata/seata/pull/2568) ] support GlobalTransactionInterceptor expression
- [[#3886](https://github.com/seata/seata/pull/3886) ] support the registry center network preferences
- [[#3869](https://github.com/seata/seata/pull/3869) ] support get configuration from environment
- [[#3906](https://github.com/seata/seata/pull/3906) ] support SPI unload
- [[#3668](https://github.com/seata/seata/pull/3668) ] support kotlin coroutine
- [[#3968](https://github.com/seata/seata/pull/3968) ] support brpc-java RPC framework
- [[#4134](https://github.com/seata/seata/pull/4134) ] init the console basic code
- [[#4268](https://github.com/seata/seata/pull/4268) ] query global session in the file mode
- [[#4281](https://github.com/seata/seata/pull/4281) ] query global session and global lock in the redis mode
- [[#4293](https://github.com/seata/seata/pull/4293) ] get global lock in the file mode
- [[#4335](https://github.com/seata/seata/pull/4335) ] Realize configuration center upload configuration interactive script (nacos,etcd3)
- [[#4360](https://github.com/seata/seata/pull/4360) ] Realize configuration center upload configuration interactive script (apollo,consul,zk)
- [[#4320](https://github.com/seata/seata/pull/4320) ] realize the interface of console: get global session and global lock in the db mode
- [[#4435](https://github.com/seata/seata/pull/4435) ] console front-end page implementation
- [[#4480](https://github.com/seata/seata/pull/4480) ] implementation of DefaultAuthSigner
- [[#3870](https://github.com/seata/seata/pull/3870) ] make seata-bom be the real Bill-Of-Material
- [[#3487](https://github.com/seata/seata/pull/3487) ] add db realization for distribute lock
- [[#3889](https://github.com/seata/seata/pull/3889) ] registry add heartbeat
- [[#3951](https://github.com/seata/seata/pull/3951) ] support zstd compressor
- [[#2838](https://github.com/seata/seata/pull/2838) ] Saga support auto configuration in the spring boot project
### bugfix
- [[#3497](https://github.com/seata/seata/pull/3497) ] fix tcc phase two response timeout exception
- [[#3686](https://github.com/seata/seata/pull/3686) ] fix NPE and wrong cluster name of Apollo
- [[#3702](https://github.com/seata/seata/pull/3702) ] fix some comments
- [[#3716](https://github.com/seata/seata/pull/3716) ] fix the problem in the findTargetClass method
- [[#3717](https://github.com/seata/seata/pull/3717) ] fix typo of interval
- [[#3773](https://github.com/seata/seata/pull/3773) ] fix consul not found tc cluster
- [[#3695](https://github.com/seata/seata/pull/3695) ] fix mariadb unable to create XA connection
- [[#3783](https://github.com/seata/seata/pull/3783) ] fix the problem that store mode does not take effect
- [[#3740](https://github.com/seata/seata/pull/3740) ] fix that `LocalThread` is not cleared when the `Saga` transaction ends
- [[#3792](https://github.com/seata/seata/pull/3792) ] fix the Server can't find redis-host property
- [[#3828](https://github.com/seata/seata/pull/3828) ] fix StringUtils StackOverflowError
- [[#3817](https://github.com/seata/seata/pull/3817) ] fix TC SkyWalking topo calling node not gather
- [[#3803](https://github.com/seata/seata/pull/3803) ] fix ReflectionUtil throw unexpected exception
- [[#3879](https://github.com/seata/seata/pull/3879) ] fix postgresql multi schema throw not found channel exception
- [[#3881](https://github.com/seata/seata/pull/3881) ] fix getConfig with different default value return the first
- [[#3897](https://github.com/seata/seata/pull/3897) ] fix LocalDataTime type in FastjsonUndoLogParser can't be rollback
- [[#3901](https://github.com/seata/seata/pull/3901) ] fix seataio/seata-server servlet-api conflict
- [[#3931](https://github.com/seata/seata/pull/3931) ] fix the wrong path and filename when dump the jvm memory for analysis
- [[#3978](https://github.com/seata/seata/pull/3978) ] fix NPE cause by future timeout
- [[#4266](https://github.com/seata/seata/pull/4266) ] fix register branch and release lock failed when the size of rows that modified is greater than 1000 in oracle
- [[#3949](https://github.com/seata/seata/pull/3949) ] fix the problem that `nacos-config.py` will not skip blank options. fix bug that split options may cause content loss
- [[#3988](https://github.com/seata/seata/pull/3988) ] fix the problem that nacos not found user when password has special characters
- [[#3998](https://github.com/seata/seata/pull/3998) ] fix the NPE of jedis multi.exec
- [[#4011](https://github.com/seata/seata/pull/4011) ] fix can not get properties of distributed-lock-table in springboot
- [[#4025](https://github.com/seata/seata/pull/4025) ] fix potential database resource leak
- [[#4023](https://github.com/seata/seata/pull/4023) ] fix the problem that the xid is not cleared in some scenes of dubbo
- [[#4039](https://github.com/seata/seata/pull/4039) ] fix RM did not clear XID after the local transaction threw an exception
- [[#4032](https://github.com/seata/seata/pull/4032) ] fix ApplicationContext already closed problem when Seata server using ShutdownHook to destroy
- [[#4074](https://github.com/seata/seata/pull/4074) ] fix prevents XA mode resource suspension
- [[#4107](https://github.com/seata/seata/pull/4107) ] fix deadlock problems during project construction
- [[#4158](https://github.com/seata/seata/pull/4158) ] fix the logback can't load the `RPC_PORT`
- [[#4162](https://github.com/seata/seata/pull/4162) ] fix correct built-in properties for redis registry
- [[#4165](https://github.com/seata/seata/pull/4165) ] fix `StringUtils.toString(obj)` throw `ClassCastException` when the obj is primitive data array
- [[#4169](https://github.com/seata/seata/pull/4169) ] fix xa mode originalConnection has been closed, cause PhaseTwo fail to execute
- [[#4177](https://github.com/seata/seata/pull/4177) ] fix the problem of accidentally releasing the global lock
- [[#4174](https://github.com/seata/seata/pull/4174) ] fix delete undo log connection already closed
- [[#4189](https://github.com/seata/seata/pull/4189) ] fix the `kafka-appender.xml` and `logstash-appender.xml`
- [[#4213](https://github.com/seata/seata/pull/4213) ] fix code for "sessionMode" not execute problem
- [[#4220](https://github.com/seata/seata/pull/4220) ] fix some problems with `zstd` compressor and add the version of the `kotlin-maven-plugin`
- [[#4222](https://github.com/seata/seata/pull/4222) ] fix could not rollback when insert field list is empty
- [[#4253](https://github.com/seata/seata/pull/4253) ] update executor store the actually modified columns but not only the columns in set condition
- [[#4276](https://github.com/seata/seata/pull/4276) ] fix seata-test module UT not work
- [[#4278](https://github.com/seata/seata/pull/4278) ] fix the problem that mysql's Blob/Clob/NClob data type cannot be deserialized
- [[#4302](https://github.com/seata/seata/pull/4302) ] fix the problem that other ORMs may not be able to obtain the auto-incrementing primary key value
- [[#4233](https://github.com/seata/seata/pull/4233) ] fix data remanence problems in lock and branch under specific circumstances.
- [[#4308](https://github.com/seata/seata/pull/4308) ] fix the TableMetaCache parsing problem with the same table under multiple Postgresql schemas
- [[#4326](https://github.com/seata/seata/pull/4326) ] fix inability to build Executor when using mariadb driver
- [[#4355](https://github.com/seata/seata/pull/4355) ] fix mysql-loadbalance resource id error
- [[#4310](https://github.com/seata/seata/pull/4310) ] fix the problem that failed to obtain the self increment ID of MySQL database through "select last_insert_id"
- [[#4331](https://github.com/seata/seata/pull/4331) ] fix dirty write check exception that may occur when using ONLY_CARE_UPDATE_COLUMNS configuration
- [[#4228](https://github.com/seata/seata/pull/4228) ] fix resource suspension in xa mode caused by choose other ip as channel alternative
- [[#4408](https://github.com/seata/seata/pull/4408) ] fix the invalid environment variable in container env
- [[#4441](https://github.com/seata/seata/pull/4441) ] fix the problem that pipelined resources are not closed in redis mode and add branchSession judge branchSessions is not null
- [[#4438](https://github.com/seata/seata/pull/4438) ] fix the problem that GlobalSession could not be deleted normally in the case of delayed deletion in the file mode of the develop branch
- [[#4432](https://github.com/seata/seata/pull/4432) ] fix the inability to get some remote configurations
- [[#4452](https://github.com/seata/seata/pull/4452) ] fix the change log of 'service.disableGlobalTransaction' config
- [[#4449](https://github.com/seata/seata/pull/4449) ] fix redis mode page npe and optimize get globalSession on average
- [[#4459](https://github.com/seata/seata/pull/4459) ] fix the failure to obtain before image and after image on oracle and pgsql of the develop branch
- [[#4471](https://github.com/seata/seata/pull/4471) ] in branch 'develop', fix the error when service.vgroupMapping change
- [[#4474](https://github.com/seata/seata/pull/4474) ] fix Mysql multi-bit Bit type field rollback error
- [[#4492](https://github.com/seata/seata/pull/4492) ] fix the failure to update cluster list dynamically when use eureka of the develop branch
- [[#4535](https://github.com/seata/seata/pull/4535) ] fix FileSessionManagerTest fail
- [[#4561](https://github.com/seata/seata/pull/4561) ] fix allSessions/findGlobalSessions may return null and cause npe
- [[#4505](https://github.com/seata/seata/pull/4505) ] fix fastjson serialization of time data types
- [[#4579](https://github.com/seata/seata/pull/4579) ] fix prepareUndoLogAll of MySQLInsertOrUpdateExecutor
- [[#4005](https://github.com/seata/seata/pull/4005) ] fix PK constraint name isn't the same as the unique index name which is belong to PK
- [[#4062](https://github.com/seata/seata/pull/4062) ] fix saga complex parameter deserialization problem
- [[#4199](https://github.com/seata/seata/pull/4199) ] fix rpc tm request timeout
- [[#4352](https://github.com/seata/seata/pull/4352) ] fix some problem of the sql parser
- [[#4487](https://github.com/seata/seata/pull/4487) ] fix remove Pagination hideOnlyOnePage attribute
- [[#4449](https://github.com/seata/seata/pull/4449) ] fix optimize redis limit and fix redis page bug
- [[#4608](https://github.com/seata/seata/pull/4608) ] fix test case
- [[#3110](https://github.com/seata/seata/pull/3110) ] fix the problem of unit test
### optimize
- [[#4163](https://github.com/seata/seata/pull/4163) ] improve CONTRIBUTING docs
- [[#3678](https://github.com/seata/seata/pull/3678) ] supplement missing configuration and new version documents
- [[#3654](https://github.com/seata/seata/pull/3654) ] fix typo,applicationContex -> applicationContext
- [[#3615](https://github.com/seata/seata/pull/3615) ] asynchronous deletion after the transaction is committed
- [[#3687](https://github.com/seata/seata/pull/3687) ] fix the case that could not retry acquire global lock
- [[#3689](https://github.com/seata/seata/pull/3689) ] modify the attribute prefix in the file file.properties
- [[#3528](https://github.com/seata/seata/pull/3528) ] optimize the memory footprint of redis mode
- [[#3700](https://github.com/seata/seata/pull/3700) ] optimize the speed of buildLockKey
- [[#3588](https://github.com/seata/seata/pull/3588) ] optimize the logic of datasource auto proxy
- [[#3626](https://github.com/seata/seata/pull/3626) ] remove repeat change status
- [[#3722](https://github.com/seata/seata/pull/3722) ] add the basic code of distributed lock
- [[#3713](https://github.com/seata/seata/pull/3713) ] unified the default value of enableClientBatchSendRequest
- [[#3120](https://github.com/seata/seata/pull/3120) ] optimize `Configuration` and add unit tests
- [[#3735](https://github.com/seata/seata/pull/3735) ] do not load `LoadBalance` if not necessary
- [[#3770](https://github.com/seata/seata/pull/3770) ] close the `Closeable` and optimize some code
- [[#3627](https://github.com/seata/seata/pull/3627) ] use TreeMap instead of the LinkedHashMap in TableMeta to compatible high level MySQL
- [[#3760](https://github.com/seata/seata/pull/3760) ] opt the logback's config of `seata-server`
- [[#3765](https://github.com/seata/seata/pull/3765) ] Transfer the operation of adding configuration class from 'AutoConfiguration' to 'EnvironmentPostProcessor'
- [[#3730](https://github.com/seata/seata/pull/3730) ] Refactoring the code of TCC mode
- [[#3820](https://github.com/seata/seata/pull/3820) ] add column `action_name` to the `tcc_fence_log`
- [[#3738](https://github.com/seata/seata/pull/3738) ] `JacksonUndoLogParser` supports to parsing `LocalDateTime`
- [[#3794](https://github.com/seata/seata/pull/3794) ] optimize the packaging of `seata-server`
- [[#3795](https://github.com/seata/seata/pull/3795) ] optimize zk registry lookup performance
- [[#3840](https://github.com/seata/seata/pull/3840) ] optimiza `apm-skwalking` operation method to generate rules
- [[#3834](https://github.com/seata/seata/pull/3834) ] optimize `seata-distribution` add `apm-seata-skywalking`
- [[#3847](https://github.com/seata/seata/pull/3847) ] optimize ConcurrentHashMap.newKeySet replace ConcurrentSet
- [[#3311](https://github.com/seata/seata/pull/3311) ] supports reading all configurations from a single Consul key
- [[#3849](https://github.com/seata/seata/pull/3849) ] optimize string concat
- [[#3890](https://github.com/seata/seata/pull/3890) ] optimize only the inserted fields are checked
- [[#3895](https://github.com/seata/seata/pull/3895) ] optimize decode exception
- [[#3898](https://github.com/seata/seata/pull/3898) ] add jib-maven-plugin
- [[#3904](https://github.com/seata/seata/pull/3904) ] ehance metrics and fix seata-server UT not work
- [[#3212](https://github.com/seata/seata/pull/3212) ] optimize recognize sql in limit and order by
- [[#3905](https://github.com/seata/seata/pull/3905) ] optimize nacos-config.sh to support ash
- [[#3935](https://github.com/seata/seata/pull/3935) ] optimize Send redis command at one time using pipeline
- [[#3916](https://github.com/seata/seata/pull/3916) ] optimize determine whether the server in the register is alive
- [[#3918](https://github.com/seata/seata/pull/3918) ] cache reflection results of the fields and methods
- [[#3898](https://github.com/seata/seata/pull/3898) ] add jib-maven-plugin
- [[#3907](https://github.com/seata/seata/pull/3907) ] optimize set server port
- [[#3912](https://github.com/seata/seata/pull/3912) ] support config JVM param in env
- [[#3939](https://github.com/seata/seata/pull/3939) ] use map instead of if else judge for more change in the future
- [[#3955](https://github.com/seata/seata/pull/3955) ] add a start banner for seata
- [[#3954](https://github.com/seata/seata/pull/3954) ] replace @Deprecated getOwnernName to getOwnerName in druid
- [[#3981](https://github.com/seata/seata/pull/3981) ] optimize service port priority
- [[#4013](https://github.com/seata/seata/pull/4013) ] optimize channel alive check
- [[#3982](https://github.com/seata/seata/pull/3982) ] optimize readme doc and upgrade some dependencies
- [[#3949](https://github.com/seata/seata/pull/3949) ] `nacos-config.py` support default parameters and optional input parameters
- [[#3991](https://github.com/seata/seata/pull/3991) ] disable listening in the FileConfiguration center in Springboot
- [[#3994](https://github.com/seata/seata/pull/3994) ] Optimize the mechanism of periodically deleting tasks in the `tcc_fence_log` table
- [[#3327](https://github.com/seata/seata/pull/3327) ] supports reading all configurations from a single Etcd3 key
- [[#4001](https://github.com/seata/seata/pull/4001) ] support to read YML configuration from Nacos, Zookeeper, Consul, Etcd3
- [[#4017](https://github.com/seata/seata/pull/4017) ] optimize file configuration
- [[#4018](https://github.com/seata/seata/pull/4018) ] optimize Apollo configuration
- [[#4021](https://github.com/seata/seata/pull/4021) ] optimize Nacos、Consul、Zookeeper、Etcd3 configuration
- [[#4034](https://github.com/seata/seata/pull/4034) ] optimize Nacos, Consul, Zookeeper and Etcd3 configuration Junit test Class
- [[#4055](https://github.com/seata/seata/pull/4055) ] optimize NetUtil#getLocalAddress0
- [[#4086](https://github.com/seata/seata/pull/4086) ] optimize lazily load branch transactions and task scheduling
- [[#4056](https://github.com/seata/seata/pull/4056) ] optimize the DurationUtil
- [[#4103](https://github.com/seata/seata/pull/4103) ] optimize AbstractLockManager#collectRowLocks logic
- [[#3733](https://github.com/seata/seata/pull/3733) ] optimize acquire lock logic
- [[#4144](https://github.com/seata/seata/pull/4144) ] support default configuration of tx-service-group
- [[#4157](https://github.com/seata/seata/pull/4157) ] optimize client batch sending.
- [[#4191](https://github.com/seata/seata/pull/4191) ] support rpc timeout can be customized.
- [[#4216](https://github.com/seata/seata/pull/4216) ] no more attempt to clean undolog for none AT mode
- [[#4176](https://github.com/seata/seata/pull/4176) ] use expire key instead hash when using redis as registry center.
- [[#4196](https://github.com/seata/seata/pull/4196) ] tc batch response to client.
- [[#4212](https://github.com/seata/seata/pull/4212) ] optimize the interface of the console
- [[#4237](https://github.com/seata/seata/pull/4237) ] skip check lock when all the before image is empty
- [[#4251](https://github.com/seata/seata/pull/4251) ] optimize partial code handling
- [[#4262](https://github.com/seata/seata/pull/4262) ] optimize tcc module code handling
- [[#4235](https://github.com/seata/seata/pull/4235) ] optimize instance saved in eureka
- [[#4277](https://github.com/seata/seata/pull/4277) ] optimize acquire lock return fail-fast code in redis-pipeline mode.
- [[#4284](https://github.com/seata/seata/pull/4284) ] support authentication of MSE-Nacos with ak/sk
- [[#4299](https://github.com/seata/seata/pull/4299) ] optimize exceptions to make them friendly
- [[#4300](https://github.com/seata/seata/pull/4300) ] optimize let DefaultCoordinator invoke NettyRemotingServer's close method,no longer closed by ServerRunner
- [[#4270](https://github.com/seata/seata/pull/4270) ] improve the performance of global commit and global rollback, asynchronous branch transaction cleanup
- [[#4307](https://github.com/seata/seata/pull/4307) ] when in TCC mode there is no need to delete global locks
- [[#4303](https://github.com/seata/seata/pull/4303) ] `tcc_fence_log` table hanging log records are deleted asynchronously
- [[#4328](https://github.com/seata/seata/pull/4328) ] upload configuration script support comments
- [[#4305](https://github.com/seata/seata/pull/4305) ] optimize acquire global lock fail error log print on tc
- [[#4336](https://github.com/seata/seata/pull/4336) ] add SQL exception prompt not supported by AT mode
- [[#4359](https://github.com/seata/seata/pull/4359) ] support configuration metadata read from environment variables
- [[#4247](https://github.com/seata/seata/pull/4247) ] add tests for `java17` and `springboot` in the `github/actions`
- [[#4353](https://github.com/seata/seata/pull/4353) ] Slimming down for the `seata-all.jar`
- [[#4393](https://github.com/seata/seata/pull/4393) ] skip reload for redis & db mode
- [[#4400](https://github.com/seata/seata/pull/4400) ] asynchronous tasks handle global transactions in parallel
- [[#4391](https://github.com/seata/seata/pull/4391) ] commit/rollback retry timeout event
- [[#4409](https://github.com/seata/seata/pull/4409) ] add copyright header to test classes
- [[#4282](https://github.com/seata/seata/pull/4282) ] optimize build UndoItem logic
- [[#4407](https://github.com/seata/seata/pull/4407) ] file mode does not require lazy processing of sessions
- [[#4436](https://github.com/seata/seata/pull/4436) ] optimize global session query in file mode
- [[#4431](https://github.com/seata/seata/pull/4431) ] limit the number of queries in Redis storage mode
- [[#4465](https://github.com/seata/seata/pull/4465) ] optimize client version transfer in tc batch response to client mode.
- [[#4469](https://github.com/seata/seata/pull/4469) ] optimize the way to get configuration in DB mode of console
- [[#4478](https://github.com/seata/seata/pull/4478) ] optimize Nacos config and naming properties
- [[#4522](https://github.com/seata/seata/pull/4522) ] optimize GC parameters in JVM
- [[#4517](https://github.com/seata/seata/pull/4517) ] enhance fail/timeout status metric and log level
- [[#4451](https://github.com/seata/seata/pull/4451) ] filesessionmanager changed to singleton and optimized task thread pool processing
- [[#4551](https://github.com/seata/seata/pull/4551) ] optimize metrics rt statistics
- [[#4574](https://github.com/seata/seata/pull/4574) ] support accessKey/secretKey auto configuration
- [[#4583](https://github.com/seata/seata/pull/4583) ] use HmacSHA256 instead of HmacSHA1 for ram signature
- [[#4591](https://github.com/seata/seata/pull/4591) ] optimize the default value of the switch
- [[#3780](https://github.com/seata/seata/pull/3780) ] optimize upgrade the Druid version
- [[#3797](https://github.com/seata/seata/pull/3797) ] optimize support instance `BusinessActionContext` outside the TCC try method
- [[#3909](https://github.com/seata/seata/pull/3909) ] optimize `collectRowLocks` method
- [[#3763](https://github.com/seata/seata/pull/3763) ] optimize github actions
- [[#4345](https://github.com/seata/seata/pull/4345) ] optimize fix the path of the package
- [[#4346](https://github.com/seata/seata/pull/4346) ] optimize the log of the server and remove lombok
- [[#4348](https://github.com/seata/seata/pull/4348) ] optimize Unified management the versions of maven-plugin
- [[#4354](https://github.com/seata/seata/pull/4354) ] optimize the tests of `SAGA`
- [[#4227](https://github.com/seata/seata/pull/4227) ] optimize the versions of the dependencies
- [[#4403](https://github.com/seata/seata/pull/4403) ] optimize disable `SAGA` tests
- [[#4453](https://github.com/seata/seata/pull/4453) ] optimize upgrade eureka-clients and xstream dependencies
- [[#4481](https://github.com/seata/seata/pull/4481) ] optimize nacos config and naming properties
- [[#4477](https://github.com/seata/seata/pull/4477) ] optimize debug log and fix typo
- [[#4484](https://github.com/seata/seata/pull/4484) ]optimize the log of TM/RM register
- [[#3874](https://github.com/seata/seata/pull/4484) ] optimize Add logo of registered enterprise,and Change image source to Alicdn
- [[#4458](https://github.com/seata/seata/pull/4458) ] optimize fix the README.md of metrices module
- [[#4482](https://github.com/seata/seata/pull/4482) ] optimize remove duplicated word
Thanks to these contributors for their code commits. Please report an unintended omission.
- [slievrly](https://github.com/slievrly)
- [wangliang181230](https://github.com/wangliang181230)
- [a364176773](https://github.com/a364176773)
- [lvekee](https://github.com/lvekee)
- [caohdgege](https://github.com/caohdgege)
- [lightClouds917](https://github.com/lightClouds917)
- [objcoding](https://github.com/objcoding)
- [siyu](https://github.com/Pinocchio2018)
- [GoodBoyCoder](https://github.com/GoodBoyCoder)
- [pengten](https://github.com/pengten)
- [Bughue](https://github.com/Bughue)
- [doubleDimple](https://github.com/doubleDimple)
- [zhaoyuguang](https://github.com/zhaoyuguang)
- [liuqiufeng](https://github.com/liuqiufeng)
- [jsbxyyx](https://github.com/jsbxyyx)
- [lcmvs](https://github.com/lcmvs)
- [onlinechild](https://github.com/onlinechild)
- [xjlgod](https://github.com/xjlgod)
- [h-zhi](https://github.com/h-zhi)
- [tanzzj](https://github.com/tanzzj)
- [miaoxueyu](https://github.com/miaoxueyu)
- [selfishlover](https://github.com/selfishlover)
- [tuwenlin](https://github.com/tuwenlin)
- [dmego](https://github.com/dmego)
- [xiaochangbai](https://github.com/xiaochangbai)
- [Rubbernecker](https://github.com/Rubbernecker)
- [ruanun](https://github.com/ruanun)
- [huan415](https://github.com/huan415)
- [drgnchan](https://github.com/drgnchan)
- [cmonkey](https://github.com/cmonkey)
- [13414850431](https://github.com/13414850431)
- [ls9527](https://github.com/ls9527)
- [xingfudeshi](https://github.com/xingfudeshi)
- [spilledyear](https://github.com/spilledyear)
- [kaka2code](https://github.com/kaka2code)
- [iqinning](https://github.com/iqinning)
- [yujianfei1986](https://github.com/yujianfei1986)
- [elrond-g](https://github.com/elrond-g)
- [jameslcj](https://github.com/jameslcj)
- [zhouchuhang](https://github.com/zch0214)
- [xujj](https://github.com/XBNGit)
- [mengxzh](https://github.com/mengxzh)
- [portman](https://github.com/iportman)
- [anselleeyy](https://github.com/anselleeyy)
- [wangyuewen](https://github.com/2858917634)
- [imherewait](https://github.com/imherewait)
- [wfnuser](https://github.com/wfnuser)
- [zhixing](https://github.com/chenlei3641)
Also, we receive many valuable issues, questions and advices from our community. Thanks for you all.
### 1.4.2 (2021-04-26)
[source](https://github.com/seata/seata/archive/v1.4.2.zip) |

View File

@ -12,6 +12,615 @@ description: 本文将向你介绍如何点击了解各版本详情和升级注
> GitHub: https://github.com/seata/seata
> 发布说明: https://github.com/seata/seata/releases
### 1.6.1 (2022-12-21)
[source](https://github.com/seata/seata/archive/v1.6.1.zip) |
[binary](https://github.com/seata/seata/releases/download/v1.6.1/seata-server-1.6.1.zip)
<details>
<summary><mark>Release notes</mark></summary>
### Seata 1.6.1
Seata 1.6.1 发布
Seata 是一款开源的分布式事务解决方案,提供高性能和简单易用的分布式事务服务。
此版本更新如下:
### feature:
- [[#5115](https://github.com/seata/seata/pull/5115)] 支持 `spring-boot:3.x`
### bugfix:
- [[#5179](https://github.com/seata/seata/pull/5179)] 修复使用Eureka作为注册中心ClassNotFoundException问题
### optimize
- [[#5120](https://github.com/seata/seata/pull/5120)] 统一yml文件中的配置项格式
- [[#5180](https://github.com/seata/seata/pull/5180)] GlobalTransactionScanner,SeataAutoDataSourceProxyCreator 创建bean用static修饰
- [[#5182](https://github.com/seata/seata/pull/5182)] 修复 Saga 可视化设计器 GGEditor 安全漏洞
- [[#5183](https://github.com/seata/seata/pull/5183)] 优化配置开关的默认值
非常感谢以下 contributors 的代码贡献。若有无意遗漏,请报告。
<!-- 请确保您的 GitHub ID 在以下列表中 -->
- [slievrly](https://github.com/slievrly)
- [wangliang181230](https://github.com/wangliang181230)
- [xingfudeshi](https://github.com/xingfudeshi)
- [whxxxxx](https://github.com/whxxxxx)
- [xssdpgy](https://github.com/xssdpgy)
同时我们收到了社区反馈的很多有价值的issue和建议非常感谢大家。
#### Link
- **Seata:** https://github.com/seata/seata
- **Seata-Samples:** https://github.com/seata/seata-samples
- **Release:** https://github.com/seata/seata/releases
- **WebSite:** https://seata.io
</details>
### 1.6.0 (2022-12-17)
[source](https://github.com/seata/seata/archive/v1.6.0.zip) |
[binary](https://github.com/seata/seata/releases/download/v1.6.0/seata-server-1.6.0.zip)
<details>
<summary><mark>Release notes</mark></summary>
### Seata 1.6.0
Seata 1.6.0 发布
Seata 是一款开源的分布式事务解决方案,提供高性能和简单易用的分布式事务服务。
此版本更新如下:
### feature
- [[#4863](https://github.com/seata/seata/pull/4863)] 支持 oracle 和 postgresql 多主键
- [[#4649](https://github.com/seata/seata/pull/4649)] seata-server支持多注册中心
- [[#4779](https://github.com/seata/seata/pull/4779)] 支持 Apache Dubbo3
- [[#4479](https://github.com/seata/seata/pull/4479)] TCC注解支持添加在接口和实现类上
- [[#4877](https://github.com/seata/seata/pull/4877)] client sdk 支持jdk17
- [[#4914](https://github.com/seata/seata/pull/4914)] 支持 mysql 的update join联表更新语法
- [[#4542](https://github.com/seata/seata/pull/4542)] 支持 oracle timestamp 类型
- [[#5111](https://github.com/seata/seata/pull/5111)] 支持Nacos contextPath 配置
- [[#4802](https://github.com/seata/seata/pull/4802)] dockerfile 支持 arm64
### bugfix
- [[#4780](https://github.com/seata/seata/pull/4780)] 修复超时回滚成功后无法发送TimeoutRollbacked事件
- [[#4954](https://github.com/seata/seata/pull/4954)] 修复output表达式错误时保存执行结果空指针异常
- [[#4817](https://github.com/seata/seata/pull/4817)] 修复高版本springboot配置不标准的问题
- [[#4838](https://github.com/seata/seata/pull/4838)] 修复使用 Statement.executeBatch() 时无法生成undo log 的问题
- [[#4533](https://github.com/seata/seata/pull/4533)] 修复handleRetryRollbacking的event重复导致的指标数据不准确
- [[#4912](https://github.com/seata/seata/pull/4912)] 修复mysql InsertOnDuplicateUpdate 列名大小写不一致无法正确匹配
- [[#4543](https://github.com/seata/seata/pull/4543)] 修复对 Oracle 数据类型nclob的支持
- [[#4915](https://github.com/seata/seata/pull/4915)] 修复获取不到ServerRecoveryProperties属性的问题
- [[#4919](https://github.com/seata/seata/pull/4919)] 修复XID的port和address出现null:0的情况
- [[#4928](https://github.com/seata/seata/pull/4928)] 修复 rpcContext.getClientRMHolderMap NPE 问题
- [[#4953](https://github.com/seata/seata/pull/4953)] 修复InsertOnDuplicateUpdate可绕过修改主键的问题
- [[#4978](https://github.com/seata/seata/pull/4978)] 修复 kryo 支持循环依赖
- [[#4985](https://github.com/seata/seata/pull/4985)] 修复 undo_log id重复的问题
- [[#4874](https://github.com/seata/seata/pull/4874)] 修复OpenJDK 11 启动失败
- [[#5018](https://github.com/seata/seata/pull/5018)] 修复启动脚本中 loader path 使用相对路径导致 server 启动失败问题
- [[#5004](https://github.com/seata/seata/pull/5004)] 修复mysql update join行数据重复的问题
- [[#5032](https://github.com/seata/seata/pull/5032)] 修复mysql InsertOnDuplicateUpdate中条件参数填充位置计算错误导致的镜像查询SQL语句异常问题
- [[#5033](https://github.com/seata/seata/pull/5033)] 修复InsertOnDuplicateUpdate的SQL语句中无插入列字段导致的空指针问题
- [[#5038](https://github.com/seata/seata/pull/5038)] 修复SagaAsyncThreadPoolProperties冲突问题
- [[#5050](https://github.com/seata/seata/pull/5050)] 修复Saga模式下全局状态未正确更改成Committed问题
- [[#5052](https://github.com/seata/seata/pull/5052)] 修复update join条件中占位符参数问题
- [[#5031](https://github.com/seata/seata/pull/5031)] 修复InsertOnDuplicateUpdate中不应该使用null值索引作为查询条件
- [[#5075](https://github.com/seata/seata/pull/5075)] 修复InsertOnDuplicateUpdate无法拦截无主键和唯一索引的SQL
- [[#5093](https://github.com/seata/seata/pull/5093)] 修复seata server重启后accessKey丢失问题
- [[#5092](https://github.com/seata/seata/pull/5092)] 修复当seata and jpa共同使用时, AutoConfiguration的顺序不正确的问题
- [[#5109](https://github.com/seata/seata/pull/5109)] 修复当RM侧没有加@GlobalTransactional报NPE的问题
- [[#5098](https://github.com/seata/seata/pull/5098)] Druid 禁用 oracle implicit cache
- [[#4860](https://github.com/seata/seata/pull/4860)] 修复metrics tag覆盖问题
- [[#5028](https://github.com/seata/seata/pull/5028)] 修复 insert on duplicate SQL中 null 值问题
- [[#5078](https://github.com/seata/seata/pull/5078)] 修复SQL语句中无主键和唯一键拦截问题
- [[#5097](https://github.com/seata/seata/pull/5097)] 修复当Server重启时 accessKey 丢失问题
- [[#5131](https://github.com/seata/seata/pull/5131)] 修复XAConn处于active状态时无法回滚的问题
- [[#5134](https://github.com/seata/seata/pull/5134)] 修复hikariDataSource 自动代理在某些情况下失效的问题
- [[#5163](https://github.com/seata/seata/pull/5163)] 修复高版本JDK编译失败的问题
### optimize
- [[#4681](https://github.com/seata/seata/pull/4681)] 优化竞争锁过程
- [[#4774](https://github.com/seata/seata/pull/4774)] 优化 seataio/seata-server 镜像中的 mysql8 依赖
- [[#4750](https://github.com/seata/seata/pull/4750)] 优化AT分支释放全局锁不使用xid
- [[#4790](https://github.com/seata/seata/pull/4790)] 添加自动发布 OSSRH github action
- [[#4765](https://github.com/seata/seata/pull/4765)] mysql8.0.29版本及以上XA模式不持connection至二阶段
- [[#4797](https://github.com/seata/seata/pull/4797)] 优化所有github actions脚本
- [[#4800](https://github.com/seata/seata/pull/4800)] 添加 NOTICE 文件
- [[#4761](https://github.com/seata/seata/pull/4761)] 使用 hget 代替 RedisLocker 中的 hmget
- [[#4414](https://github.com/seata/seata/pull/4414)] 移除log4j依赖
- [[#4836](https://github.com/seata/seata/pull/4836)] 优化 BaseTransactionalExecutor#buildLockKey(TableRecords rowsIncludingPK) 方法可读性
- [[#4865](https://github.com/seata/seata/pull/4865)] 修复 Saga 可视化设计器 GGEditor 安全漏洞
- [[#4590](https://github.com/seata/seata/pull/4590)] 自动降级支持开关支持动态配置
- [[#4490](https://github.com/seata/seata/pull/4490)] tccfence 记录表优化成按索引删除
- [[#4911](https://github.com/seata/seata/pull/4911)] 添加 header 和license 检测
- [[#4917](https://github.com/seata/seata/pull/4917)] 升级 package-lock.json 修复漏洞
- [[#4924](https://github.com/seata/seata/pull/4924)] 优化 pom 依赖
- [[#4932](https://github.com/seata/seata/pull/4932)] 抽取部分配置的默认值
- [[#4925](https://github.com/seata/seata/pull/4925)] 优化 javadoc 注释
- [[#4921](https://github.com/seata/seata/pull/4921)] 修复控制台模块安全漏洞和升级 skywalking-eyes 版本
- [[#4936](https://github.com/seata/seata/pull/4936)] 优化存储配置的读取
- [[#4946](https://github.com/seata/seata/pull/4946)] 将获取锁时遇到的sql异常传递给客户端
- [[#4962](https://github.com/seata/seata/pull/4962)] 优化构建配置并修正docker镜像的基础镜像
- [[#4974](https://github.com/seata/seata/pull/4974)] 取消redis模式下,查询globalStatus数量的限制
- [[#4981](https://github.com/seata/seata/pull/4981)] 优化当tcc fence记录查不到时的错误提示
- [[#4995](https://github.com/seata/seata/pull/4995)] 修复mysql InsertOnDuplicateUpdate后置镜像查询SQL中重复的主键查询条件
- [[#5047](https://github.com/seata/seata/pull/5047)] 移除无用代码
- [[#5051](https://github.com/seata/seata/pull/5051)] 回滚时undolog产生脏写需要抛出不再重试(BranchRollbackFailed_Unretriable)的异常
- [[#5075](https://github.com/seata/seata/pull/5075)] 拦截没有主键及唯一索引值的insert on duplicate update语句
- [[#5104](https://github.com/seata/seata/pull/5104)] ConnectionProxy脱离对druid的依赖
- [[#5124](https://github.com/seata/seata/pull/5124)] 支持oracle删除TCC fence记录表
- [[#4468](https://github.com/seata/seata/pull/4968)] 支持kryo 5.3.0
- [[#4807](https://github.com/seata/seata/pull/4807)] 优化镜像和OSS仓库发布流水线
- [[#4445](https://github.com/seata/seata/pull/4445)] 优化事务超时判断
- [[#4958](https://github.com/seata/seata/pull/4958)] 优化超时事务 triggerAfterCommit() 的执行
- [[#4582](https://github.com/seata/seata/pull/4582)] 优化redis存储模式的事务排序
- [[#4963](https://github.com/seata/seata/pull/4963)] 增加 ARM64 流水线 CI 测试
- [[#4434](https://github.com/seata/seata/pull/4434)] 移除 seata-server CMS GC 参数
### test
- [[#4411](https://github.com/seata/seata/pull/4411)] 测试Oracle数据库AT模式下类型支持
- [[#4794](https://github.com/seata/seata/pull/4794)] 重构代码,尝试修复单元测试 `DataSourceProxyTest.getResourceIdTest()`
- [[#5101](https://github.com/seata/seata/pull/5101)] 修复zk注册和配置中心报ClassNotFoundException的问题 `DataSourceProxyTest.getResourceIdTest()`
非常感谢以下 contributors 的代码贡献。若有无意遗漏,请报告。
<!-- 请确保您的 GitHub ID 在以下列表中 -->
- [slievrly](https://github.com/slievrly)
- [renliangyu857](https://github.com/renliangyu857)
- [wangliang181230](https://github.com/wangliang181230)
- [a364176773](https://github.com/a364176773)
- [tuwenlin](https://github.com/tuwenlin)
- [conghuhu](https://github.com/conghuhu)
- [a1104321118](https://github.com/a1104321118)
- [duanqiaoyanyu](https://github.com/duanqiaoyanyu)
- [robynron](https://github.com/robynron)
- [lcmvs](https://github.com/lcmvs)
- [github-ganyu](https://github.com/github-ganyu)
- [1181954449](https://github.com/1181954449)
- [zw201913](https://github.com/zw201913)
- [wingchi-leung](https://github.com/wingchi-leung)
- [AlexStocks](https://github.com/AlexStocks)
- [liujunlin5168](https://github.com/liujunlin5168)
- [pengten](https://github.com/pengten)
- [liuqiufeng](https://github.com/liuqiufeng)
- [yujianfei1986](https://github.com/yujianfei1986)
- [Bughue](https://github.com/Bughue)
- [AlbumenJ](https://github.com/AlbumenJ)
- [doubleDimple](https://github.com/doubleDimple)
- [jsbxyyx](https://github.com/jsbxyyx)
- [tuwenlin](https://github.com/tuwenlin)
- [CrazyLionLi](https://github.com/JavaLionLi)
- [whxxxxx](https://github.com/whxxxxx)
- [neillee95](https://github.com/neillee95)
- [crazy-sheep](https://github.com/crazy-sheep)
- [zhangzq7](https://github.com/zhangzq7)
- [l81893521](https://github.com/l81893521)
- [zhuyoufeng](https://github.com/zhuyoufeng)
- [xingfudeshi](https://github.com/xingfudeshi)
- [odidev](https://github.com/odidev)
- [miaoxueyu](https://github.com/miaoxueyu)
同时我们收到了社区反馈的很多有价值的issue和建议非常感谢大家。
#### Link
- **Seata:** https://github.com/seata/seata
- **Seata-Samples:** https://github.com/seata/seata-samples
- **Release:** https://github.com/seata/seata/releases
- **WebSite:** https://seata.io
</details>
### 1.5.2 (2022-07-12)
[source](https://github.com/seata/seata/archive/v1.5.2.zip) |
[binary](https://github.com/seata/seata/releases/download/v1.5.2/seata-server-1.5.2.zip)
<details>
<summary><mark>Release notes</mark></summary>
### Seata 1.5.2
Seata 1.5.2 发布。
Seata 是一款开源的分布式事务解决方案,提供高性能和简单易用的分布式事务服务。
此版本更新如下:
### feature
- [[#4661](https://github.com/seata/seata/pull/4713)] 支持根据xid负载均衡算法
- [[#4676](https://github.com/seata/seata/pull/4676)] 支持Nacos作为注册中心时server通过挂载SLB暴露服务
- [[#4642](https://github.com/seata/seata/pull/4642)] 支持client批量请求并行处理
- [[#4567](https://github.com/seata/seata/pull/4567)] 支持where条件中find_in_set函数
### bugfix
- [[#4515](https://github.com/seata/seata/pull/4515)] 修复develop分支SeataTCCFenceAutoConfiguration在客户端未使用DB时启动抛出ClassNotFoundException的问题。
- [[#4661](https://github.com/seata/seata/pull/4661)] 修复控制台中使用PostgreSQL出现的SQL异常
- [[#4667](https://github.com/seata/seata/pull/4682)] 修复develop分支RedisTransactionStoreManager迭代时更新map的异常
- [[#4678](https://github.com/seata/seata/pull/4678)] 修复属性transport.enableRmClientBatchSendRequest没有配置的情况下缓存穿透的问题
- [[#4701](https://github.com/seata/seata/pull/4701)] 修复命令行参数丢失问题
- [[#4607](https://github.com/seata/seata/pull/4607)] 修复跳过全局锁校验的缺陷
- [[#4696](https://github.com/seata/seata/pull/4696)] 修复 oracle 存储模式时的插入问题
- [[#4726](https://github.com/seata/seata/pull/4726)] 修复批量发送消息时可能的NPE问题
- [[#4729](https://github.com/seata/seata/pull/4729)] 修复AspectTransactional.rollbackForClassName设置错误
- [[#4653](https://github.com/seata/seata/pull/4653)] 修复 INSERT_ON_DUPLICATE 主键为非数值异常
### optimize
- [[#4650](https://github.com/seata/seata/pull/4650)] 修复安全漏洞
- [[#4670](https://github.com/seata/seata/pull/4670)] 优化branchResultMessageExecutor线程池的线程数
- [[#4662](https://github.com/seata/seata/pull/4662)] 优化回滚事务监控指标
- [[#4693](https://github.com/seata/seata/pull/4693)] 优化控制台导航栏
- [[#4700](https://github.com/seata/seata/pull/4700)] 修复 maven-compiler-plugin 和 maven-resources-plugin 执行失败
- [[#4711](https://github.com/seata/seata/pull/4711)] 分离部署时 lib 依赖
- [[#4720](https://github.com/seata/seata/pull/4720)] 优化pom描述
- [[#4728](https://github.com/seata/seata/pull/4728)] 将logback版本依赖升级至1.2.9
- [[#4745](https://github.com/seata/seata/pull/4745)] 发行包中支持 mysql8 driver
- [[#4626](https://github.com/seata/seata/pull/4626)] 使用 `easyj-maven-plugin` 插件代替 `flatten-maven-plugin`插件,以修复`shade` 插件与 `flatten` 插件不兼容的问题
- [[#4629](https://github.com/seata/seata/pull/4629)] 更新globalSession状态时检查更改前后的约束关系
- [[#4662](https://github.com/seata/seata/pull/4662)] 优化 EnhancedServiceLoader 可读性
### test
- [[#4544](https://github.com/seata/seata/pull/4544)] 优化TransactionContextFilterTest中jackson包依赖问题
- [[#4731](https://github.com/seata/seata/pull/4731)] 修复 AsyncWorkerTest 和 LockManagerTest 的单测问题。
非常感谢以下 contributors 的代码贡献。若有无意遗漏,请报告。
<!-- 请确保您的 GitHub ID 在以下列表中 -->
- [slievrly](https://github.com/slievrly)
- [pengten](https://github.com/pengten)
- [YSF-A](https://github.com/YSF-A)
- [tuwenlin](https://github.com/tuwenlin)
- [2129zxl](https://github.com/2129zxl)
- [Ifdevil](https://github.com/Ifdevil)
- [wingchi-leung](https://github.com/wingchi-leung)
- [liurong](https://github.com/robynron)
- [opelok-z](https://github.com/opelok-z)
- [a364176773](https://github.com/a364176773)
- [Smery-lxm](https://github.com/Smery-lxm)
- [lvekee](https://github.com/lvekee)
- [doubleDimple](https://github.com/doubleDimple)
- [wangliang181230](https://github.com/wangliang181230)
- [Bughue](https://github.com/Bughue)
- [AYue-94](https://github.com/AYue-94)
- [lingxiao-wu](https://github.com/lingxiao-wu)
- [caohdgege](https://github.com/caohdgege)
同时我们收到了社区反馈的很多有价值的issue和建议非常感谢大家。
#### Link
- **Seata:** https://github.com/seata/seata
- **Seata-Samples:** https://github.com/seata/seata-samples
- **Release:** https://github.com/seata/seata/releases
- **WebSite:** https://seata.io
</details>
### 1.5.1 (2022-05-17)
[source](https://github.com/seata/seata/archive/v1.5.1.zip) |
[binary](https://github.com/seata/seata/releases/download/v1.5.1/seata-server-1.5.1.zip)
<details>
<summary><mark>Release notes</mark></summary>
### Seata 1.5.1
Seata 1.5.1 发布。
Seata 是一款开源的分布式事务解决方案,提供高性能和简单易用的分布式事务服务。
此版本更新如下:
### feature
[#4115](https://github.com/seata/seata/pull/4115) 支持用户控制台
[#3652](https://github.com/seata/seata/pull/3652) 支持 APM SkyWalking 集成
[#3472](https://github.com/seata/seata/pull/3472) 添加 redisLocker 的 lua 模式
[#3575](https://github.com/seata/seata/pull/3575) 支持对锁和会话不同存储的混合使用
[#3009](https://github.com/seata/seata/pull/3009) 支持 server 端以 springboot的方式的启动
[#3374](https://github.com/seata/seata/pull/3374) 支持 MySQL INSERT ON DUPLICATE KEY UPDATE
[#3642](https://github.com/seata/seata/pull/3642) TCC 模式支持使用 API 的形式进行二阶段参数传递
[#3064](https://github.com/seata/seata/pull/3064) 支持可配置 GlobalTransactionInterceptor 和 TccActionInterceptor 的order值
[#2852](https://github.com/seata/seata/pull/2852) 支持自定义 GlobalTransactionScanner 的扫描对象
[#3683](https://github.com/seata/seata/pull/3683) 支持 Redis 分布式锁来避免多TC竞争执行任务
[#3545](https://github.com/seata/seata/pull/3545) TCC 模式支持幂等控制、防悬挂和空回滚
[#3823](https://github.com/seata/seata/pull/3823) TCC 模式二阶段方法参数列表支持自定义
[#3642](https://github.com/seata/seata/pull/3642) TCC 模式一阶段支持 BusinessActionContext 隐式传递
[#3856](https://github.com/seata/seata/pull/3856) 支持 Edas-Hsf RPC 框架
[#3869](https://github.com/seata/seata/pull/3869) 支持从环境 ENV 获取配置
[#2568](https://github.com/seata/seata/pull/2568) 支持 GlobalTransactionInterceptor 配置切面表达式
[#3886](https://github.com/seata/seata/pull/3886) 支持注册中心注册 ip 的网络偏好设置
[#3906](https://github.com/seata/seata/pull/3906) 支持 SPI 卸载
[#3668](https://github.com/seata/seata/pull/3668) 支持 kotlin 协程
[#3968](https://github.com/seata/seata/pull/3968) 支持 bRPC-java RPC框架
[#4268](https://github.com/seata/seata/pull/4268) 增加控制台 Global Session页面File模式实现
[#4281](https://github.com/seata/seata/pull/4281) 增加控制台 Global Session页面和Global LockRedis模式实现
[#4293](https://github.com/seata/seata/pull/4293) 增加控制台 Global Lock页面File模式实现
[#4335](https://github.com/seata/seata/pull/4335) 实现配置中心上传配置交互脚本(nacos,etcd3)
[#4360](https://github.com/seata/seata/pull/4360) 实现配置中心上传配置交互脚本(apollo,consul,zk)
[#4320](https://github.com/seata/seata/pull/4320) 实现控制台db模式全局事务、锁查询接口
[#4435](https://github.com/seata/seata/pull/4435) 控制台前端页面实现
[#4480](https://github.com/seata/seata/pull/4480) 实现 DefaultAuthSigner 的默认签名加密方法
[#3487](https://github.com/seata/seata/pull/3487) 增加分布式锁的 DB 实现
[#3951](https://github.com/seata/seata/pull/3951) 支持 zstd 压缩
[#2838](https://github.com/seata/seata/pull/2838) Saga 支持 springboot 项目的自动配置
### bugfix
[#3497](https://github.com/seata/seata/pull/3497) 修复 TCC 模式并发量较大时线程池导致的超时问题
[#3686](https://github.com/seata/seata/pull/3686) 修复 Apollo 集群配置项错误及NPE错误
[#3716](https://github.com/seata/seata/pull/3716) 修复 findTargetClass 方法的错误
[#3773](https://github.com/seata/seata/pull/3773) 修复 consul 注册中心在自定义集群名下无法获取 TC 集群
[#3695](https://github.com/seata/seata/pull/3695) 修复 mariadb 无法创建XA连接的问题
[#3783](https://github.com/seata/seata/pull/3783) 修复 store mode 不生效问题
[#3740](https://github.com/seata/seata/pull/3740) 修复在某些情况下当Saga事务结束时 LocalThread 未被清除的问题
[#3792](https://github.com/seata/seata/pull/3792) 修复 Server 无法获取 Redis host的问题
[#3828](https://github.com/seata/seata/pull/3828) 修复 StringUtils 抛出 StackOverflowError 的问题
[#3817](https://github.com/seata/seata/pull/3817) 修复 TC 在SkyWalking拓扑图节点不汇聚的问题
[#3803](https://github.com/seata/seata/pull/3803) 修复 ReflectionUtil 抛出不预期异常问题
[#3879](https://github.com/seata/seata/pull/3879) 修复 PosrgreSQL多schema无法找到channel问题
[#3881](https://github.com/seata/seata/pull/3881) 修复不存在的相同 DataId 不同默认值返回相同值的问题
[#3897](https://github.com/seata/seata/pull/3897) 修复 FastjsonUndoLogParser 中 localdatatime类型不能回滚的问题
[#3901](https://github.com/seata/seata/pull/3901) 修复 seataio/seata-server 镜像中 servlet-api 冲突无法启动问题
[#3931](https://github.com/seata/seata/pull/3931) 修复 线程池拒绝执行情况下,dump内存文件名和路径错误的问题
[#3949](https://github.com/seata/seata/pull/3949) 修复 nacos-config.py 空白选项的问题和内容丢失的问题
[#3988](https://github.com/seata/seata/pull/3988) 修复 nacos 的密码带有特殊字符导致用户名不存在问题
[#3978](https://github.com/seata/seata/pull/3978) 修复 future timeout 引发的 NPE 问题
[#3998](https://github.com/seata/seata/pull/3978) 修复 jedis multi.exec 的 NPE 问题
[#4011](https://github.com/seata/seata/pull/4011) 修复 springboot下无法获取distributed-lock-table配置
[#4023](https://github.com/seata/seata/pull/4023) 修复 dubbo部分场景存在xid未清除的问题
[#4032](https://github.com/seata/seata/pull/4032) 修复 server端的ShutdownHook在资源释放时ApplicationContext已关闭的问题
[#4039](https://github.com/seata/seata/pull/4039) 修复本地事务抛出异常后 RM 没有清除xid问题
[#4074](https://github.com/seata/seata/pull/4074) 修复 XA 模式资源悬挂问题
[#4107](https://github.com/seata/seata/pull/4107) 修复项目构建时的死锁问题
[#4158](https://github.com/seata/seata/pull/4158) 修复 logback 无法加载到 RPC_PORT 的问题
[#4162](https://github.com/seata/seata/pull/4162) 修复 Redis 注册中心内置配置名导致启动报错问题
[#4165](https://github.com/seata/seata/pull/4165) 修复 StringUtils.toString(obj) 当obj是基本数据数组时抛出ClassCastException的问题
[#4169](https://github.com/seata/seata/pull/4169) 修复 XA 模式originalConnection已关闭导致二阶段无法执行
[#4177](https://github.com/seata/seata/pull/4177) 修复当事务超时且TM发起commit决议时,意外造成全局锁释放的问题
[#4174](https://github.com/seata/seata/pull/4174) 修复删除 undolog 时连接关闭问题
[#4189](https://github.com/seata/seata/pull/4189) 修复 kafka-appender.xml 和 logstash-appender.xml 配置文件表达式中的默认值问题
[#4213](https://github.com/seata/seata/pull/4213) 修复部分"sessionMode"代码未执行导致启动失败问题
[#4220](https://github.com/seata/seata/pull/4220) 修复 zstd-compressor 模块未合并到 seata-all 中的问题
[#4222](https://github.com/seata/seata/pull/4222) 修复字段列表为空时,插入语句无法回滚的问题
[#4253](https://github.com/seata/seata/pull/4253) 修复 UpdateExecutor只存储set 字段问题
[#4233](https://github.com/seata/seata/pull/4233) 修复 lock 和 branch 数据残留问题
[#4278](https://github.com/seata/seata/pull/4278) 修复 MySQL 的Blob/Clob/NClob数据类型无法反序列化的问题
[#4302](https://github.com/seata/seata/pull/4302) 修复 ORM 可能存在获取不到自增主键值的问题
[#4308](https://github.com/seata/seata/pull/4308) 修复PostgreSQL多个schema下存在相同表的TableMetaCache解析问题
[#4326](https://github.com/seata/seata/pull/4326) 修复使用 MariaDB 驱动程序时无法构建 Executor 的问题
[#4355](https://github.com/seata/seata/pull/4355) 修复使用 MySQL Loadbalance模式resourceId被误判为resourceIds的问题
[#4310](https://github.com/seata/seata/pull/4310) 修复通过 SELECT LAST_INSERT_ID 获取数据库自增id失败的问题
[#4331](https://github.com/seata/seata/pull/4331) 修复使用 ONLY_CARE_UPDATE_COLUMNS 配置可能出现的脏写校验异常
[#4408](https://github.com/seata/seata/pull/4408) 修复容器环境中设置环境变量无效的问题
[#4441](https://github.com/seata/seata/pull/4441) 修复Redis 存储模式下查询时未关闭 Pipeline
和分支注册后添加分支session时branchSessions为null的问题
[#4438](https://github.com/seata/seata/pull/4438) 修复 file 模式下 GlobalSession 在延迟删除的情况下无法被正常删除的问题
[#4432](https://github.com/seata/seata/pull/4432) 修复 ServerApplicationListener无法读取配置中心配置的问题
[#4452](https://github.com/seata/seata/pull/4452) 修复 service.disableGlobalTransaction 配置的日志输出错误
[#4449](https://github.com/seata/seata/pull/4449) 修复 Redis 分页查询 NPE 问题,优化readession限制查询条数后均衡返回结果
[#4459](https://github.com/seata/seata/pull/4459) 修复 Oracle 和 PostgreSQL 数据库生成前后镜像失败的问题
[#4471](https://github.com/seata/seata/pull/4471) 修复运行时切换事务分组对应集群引起的错误
[#4474](https://github.com/seata/seata/pull/4474) 修复 MySQL 多位Bit类型字段回滚错误
[#4492](https://github.com/seata/seata/pull/4492) 修复 eureka 注册中心无法动态更新服务列表的问题
[#4228](https://github.com/seata/seata/pull/4228) 修复 TC 获取不同 ip 的 RM 连接导致的xa模式资源悬挂问题
[#4561](https://github.com/seata/seata/pull/4561) 修复 allSessions/findGlobalSessions 某些情况下返回null 的问题
[#4505](https://github.com/seata/seata/pull/4505) 修复 time类型的fastjson序列化问题
[#4579](https://github.com/seata/seata/pull/4579) 修复 MySQLInsertOrUpdateExecutor的prepareUndoLogAll
[#4005](https://github.com/seata/seata/pull/4005) 修复 PK 约束名称与属于PK的唯一索引名称不同
[#4062](https://github.com/seata/seata/pull/4062) 修复 Saga 复杂参数序列化问题
[#4199](https://github.com/seata/seata/pull/4199) 修复 RPC TM 请求超时问题
[#4352](https://github.com/seata/seata/pull/4352) 修复 SQL 解析器的一些问题
[#3687](https://github.com/seata/seata/pull/3687) 修复某些场景下无法重试全局锁的问题
### optimize/test
[#3700](https://github.com/seata/seata/pull/3700) 优化buildLockKey方法的效率
[#3615](https://github.com/seata/seata/pull/3615) 优化二阶段同步提交时全局事务记录可异步删除
[#3689](https://github.com/seata/seata/pull/3689) 修正script/server/config/file.properties中属性编写错误
[#3588](https://github.com/seata/seata/pull/3588) 优化数据源自动代理的流程
[#3528](https://github.com/seata/seata/pull/3528) 优化Redis存储模式内存占用
[#3626](https://github.com/seata/seata/pull/3626) 移除重复的changeStatus代码
[#3722](https://github.com/seata/seata/pull/3722) 添加分布式锁的代码
[#3713](https://github.com/seata/seata/pull/3713) 统一enableClientBatchSendRequest的默认值
[#3120](https://github.com/seata/seata/pull/3120) 优化Configuration的部分代码并添加单元测试
[#3735](https://github.com/seata/seata/pull/3735) 当TC只有单个节点时不进行非必要的负载均衡操作
[#3770](https://github.com/seata/seata/pull/3770) 关闭一些未关闭的对象
[#3627](https://github.com/seata/seata/pull/3627) 使用TreeMap替换 TableMeta 中的 LinkedHashMap 以兼容高版本的MySQL
[#3760](https://github.com/seata/seata/pull/3760) 优化seata-server的logback相关的配置
[#3765](https://github.com/seata/seata/pull/3765) 将添加配置类的操作从AutoConfiguration转移到EnvironmentPostProcessor中并提升该操作的优先级
[#3730](https://github.com/seata/seata/pull/3730) 重构TCC模式相关的代码
[#3820](https://github.com/seata/seata/pull/3820) 在表tcc_fence_log中新增字段action_name
[#3738](https://github.com/seata/seata/pull/3738) JacksonUndoLogParser支持解析LocalDateTime(支持微秒时间)
[#3794](https://github.com/seata/seata/pull/3794) 优化seata-server的打包配置修正Dockerfile的错误配置并将Dockerfile也打包进去
[#3795](https://github.com/seata/seata/pull/3795) 优化zkRegistrylookup方法性能
[#3840](https://github.com/seata/seata/pull/3840) 优化apm-skwalking操作方法生成规则
[#3834](https://github.com/seata/seata/pull/3834) 优化seata-distribution增加apm-seata-skywalking包
[#3847](https://github.com/seata/seata/pull/3847) 优化ConcurrentHashMap.newKeySet替换ConcurrentSet
[#3849](https://github.com/seata/seata/pull/3849) 优化字符串拼接
[#3890](https://github.com/seata/seata/pull/3890) 优化insert后镜像仅查询插入字段
[#3895](https://github.com/seata/seata/pull/3895) 优化解码异常
[#3212](https://github.com/seata/seata/pull/3212) 优化解析OrderByLimit条件代码结构
[#3898](https://github.com/seata/seata/pull/3898) 增加docker maven 插件
[#3904](https://github.com/seata/seata/pull/3904) 增强 metrics 和修复 seata-server 单测不运行的问题
[#3905](https://github.com/seata/seata/pull/3905) 优化 nacos-config.sh 支持 ash
[#3935](https://github.com/seata/seata/pull/3935) 优化以Redis为注册中心时,发送多条命令使用pipeline
[#3916](https://github.com/seata/seata/pull/3916) 优化注册中心服务节点列表地址探活
[#3918](https://github.com/seata/seata/pull/3918) 缓存Field和Method的反射结果
[#3311](https://github.com/seata/seata/pull/3311) 支持从consul单一key中读取所有配置
[#3907](https://github.com/seata/seata/pull/3907) 优化设置 Server 端口
[#3912](https://github.com/seata/seata/pull/3912) 支持通过env配置JVM参数
[#3939](https://github.com/seata/seata/pull/3939) 使用map优化大量的判断代码
[#3955](https://github.com/seata/seata/pull/3955) 添加启动banner
[#4266](https://github.com/seata/seata/pull/4266) 修改由于修改记录过多导致分支注册及lock释放失败的问题
[#3949](https://github.com/seata/seata/pull/3949) nacos-config.py 支持默认参数和选择性输入参数
[#3954](https://github.com/seata/seata/pull/3954) 移除对druid依赖中过期方法的调用
[#3981](https://github.com/seata/seata/pull/3981) 优化服务端口的优先级设置
[#4013](https://github.com/seata/seata/pull/4013) 优化可用TC地址检测
[#3982](https://github.com/seata/seata/pull/3982) 优化 readme 文档和升级POM依赖
[#3991](https://github.com/seata/seata/pull/3991) 关闭SpringBoot下无用的fileListener
[#3994](https://github.com/seata/seata/pull/3994) 优化tcc_fence_log表定时删除任务的机制
[#3327](https://github.com/seata/seata/pull/3327) 支持从etcd3单一key中读取所有配置
[#4001](https://github.com/seata/seata/pull/4001) 支持从Nacos,Zookeeper,Consul,Etcd3 中读取 yml
[#4017](https://github.com/seata/seata/pull/4017) 优化文件配置
[#4018](https://github.com/seata/seata/pull/4018) 优化 Apollo 配置
[#4021](https://github.com/seata/seata/pull/4021) 优化 Nacos、Consul、Zookeeper、Etcd3 配置
[#4055](https://github.com/seata/seata/pull/4055) 优化NetUtil的getLocalAddress0方法
[#4086](https://github.com/seata/seata/pull/4086) 分支事务支持懒加载并优化任务调度
[#4056](https://github.com/seata/seata/pull/4056) 优化 DurationUtil
[#4103](https://github.com/seata/seata/pull/4103) 减少分支事务注册无需竞争锁时的内存占用
[#3733](https://github.com/seata/seata/pull/3733) 优化本地事务下的锁竞争机制
[#4144](https://github.com/seata/seata/pull/4144) 支持默认的事务分组配置
[#4157](https://github.com/seata/seata/pull/4157) 优化客户端批量发送请求
[#4191](https://github.com/seata/seata/pull/4191) RPC 请求超时时间支持配置化
[#4216](https://github.com/seata/seata/pull/4216) 非 AT 模式无须清理undolog表
[#4176](https://github.com/seata/seata/pull/4176) 优化 Redis 注册中心存储改用自动过期key替代hash.
[#4196](https://github.com/seata/seata/pull/4196) TC 批量响应客户端
[#4212](https://github.com/seata/seata/pull/4212) 控制台接口合并优化
[#4237](https://github.com/seata/seata/pull/4237) 当所有的 before image均为空的时候跳过 checkLock 的步骤
[#4251](https://github.com/seata/seata/pull/4251) 优化部分代码处理
[#4262](https://github.com/seata/seata/pull/4262) 优化 TCC 模块代码处理
[#4235](https://github.com/seata/seata/pull/4235) 优化 eureka 注册中心保存实例信息
[#4277](https://github.com/seata/seata/pull/4277) 优化 Redis-pipeline模式本地事务下的锁竞争机制
[#4284](https://github.com/seata/seata/pull/4284) 支持 MSE-Nacos 的 ak/sk 鉴权方式
[#4299](https://github.com/seata/seata/pull/4299) 优化异常提示
[#4300](https://github.com/seata/seata/pull/4300) 优化NettyRemotingServer的close()
[#4270](https://github.com/seata/seata/pull/4270) 提高全局提交和全局回滚的性能,分支事务清理异步化
[#4307](https://github.com/seata/seata/pull/4307) 优化在 TCC 模式减少不必要的全局锁删除
[#4303](https://github.com/seata/seata/pull/4303) tcc_fence_log表悬挂日志记录异步删除
[#4328](https://github.com/seata/seata/pull/4328) 配置上传脚本支持注释
[#4305](https://github.com/seata/seata/pull/4305) 优化 TC 端全局锁获取失败时的日志打印
[#4336](https://github.com/seata/seata/pull/4336) 添加 AT 模式不支持的SQL语句异常提示
[#4359](https://github.com/seata/seata/pull/4359) 支持配置元数据读取环境变量
[#4353](https://github.com/seata/seata/pull/4353) seata-all.jar 瘦身
[#4393](https://github.com/seata/seata/pull/4393) Redis & DB 模式下启动不需要reload
[#4247](https://github.com/seata/seata/pull/4247) 在github actions上添加基于 java17 和 springboot 各版本的测试
[#4400](https://github.com/seata/seata/pull/4400) 异步二阶段任务支持并行处理提升效率
[#4391](https://github.com/seata/seata/pull/4391) commit/rollback 重试超时事件
[#4282](https://github.com/seata/seata/pull/4282) 优化回滚镜像构建逻辑
[#4276](https://github.com/seata/seata/pull/4276) 修复 seata-test 单测不运行的问题
[#4407](https://github.com/seata/seata/pull/4407) file模式下无需延迟删除globasession
[#4436](https://github.com/seata/seata/pull/4436) 优化file模式下的global session查询接口
[#4431](https://github.com/seata/seata/pull/4431) 优化Redis模式查询globalSession限制查询条数
[#4465](https://github.com/seata/seata/pull/4465) 优化TC 批量响应客户端模式客户端版本传输方式
[#4469](https://github.com/seata/seata/pull/4469) 优化控制台db模式下获取配置的方式
[#4478](https://github.com/seata/seata/pull/4478) 优化 Nacos 配置和注册元数据属性
[#4522](https://github.com/seata/seata/pull/4522) 优化 GC 参数
[#4517](https://github.com/seata/seata/pull/4517) 增强失败/超时状态的监控
[#4451](https://github.com/seata/seata/pull/4451) fileSessionManager改为单例并优化任务线程池处理
[#4551](https://github.com/seata/seata/pull/4551) 优化 metrics rt 统计问题
[#4574](https://github.com/seata/seata/pull/4574) 支持 accessKey/secretKey 配置自动注入
[#4583](https://github.com/seata/seata/pull/4583) DefaultAuthSigner 的默认签名加密方法替换为HmacSHA256
[#4591](https://github.com/seata/seata/pull/4591) 优化开关默认值
[#3780](https://github.com/seata/seata/pull/3780) 升级 Druid 版本
[#3797](https://github.com/seata/seata/pull/3797) 支持在Try 方法外由用户自己实例化BusinessActionContext
[#3909](https://github.com/seata/seata/pull/3909) 优化collectRowLocks 方法
[#3763](https://github.com/seata/seata/pull/3763) 优化 github actions
[#4345](https://github.com/seata/seata/pull/4345) 修正包目录名
[#4346](https://github.com/seata/seata/pull/4346) 优化服务器日志并移除lombok
[#4348](https://github.com/seata/seata/pull/4348) 统一管理maven插件及其版本
[#4354](https://github.com/seata/seata/pull/4354) 优化saga测试用例
[#4227](https://github.com/seata/seata/pull/4227) 统一管理依赖的版本并且升级spring-boot到2.4.13
[#4453](https://github.com/seata/seata/pull/4453) 升级 eureka-clients 和 xstream 的版本
[#4481](https://github.com/seata/seata/pull/4481) 优化nacos配置和命名属性
[#4477](https://github.com/seata/seata/pull/4477) 优化调试级别日志并修复拼写错误
[#4484](https://github.com/seata/seata/pull/4484) 优化TM/RM注册时TC的日志打印
[#4458](https://github.com/seata/seata/pull/4458) 修复 metrices 模块 README.md 的配置遗漏问题
[#4482](https://github.com/seata/seata/pull/4482) [#3654](https://github.com/seata/seata/pull/3654) 修复typos
[#3880](https://github.com/seata/seata/pull/3880) 贡献文档增加中文版本
[#4134](https://github.com/seata/seata/pull/4134) 初始化控制台基础代码
[#3870](https://github.com/seata/seata/pull/3870) 让seata-bom成为真正的Bill-Of-Material
[#3889](https://github.com/seata/seata/pull/3889) 支持注册中心添加心跳
[#3702](https://github.com/seata/seata/pull/3702) 修改注释
[#4608](https://github.com/seata/seata/pull/4608) [#3110](https://github.com/seata/seata/pull/4465) 修复测试用例
[#4163](https://github.com/seata/seata/pull/4163) 完善开发者奉献文档
[#3678](https://github.com/seata/seata/pull/3678) 补充遗漏的配置及新版本pr登记md文件
[#4449](https://github.com/seata/seata/pull/4449) 优化 Redis limit 并修复 Redis 分页问题
[#4535](https://github.com/seata/seata/pull/4535) 修复 FileSessionManagerTest单测错误
[#4025](https://github.com/seata/seata/pull/4025) 优化潜在的数据库资源泄露
非常感谢以下 contributors 的代码贡献。若有无意遗漏,请报告。
- [slievrly](https://github.com/slievrly)
- [wangliang181230](https://github.com/wangliang181230)
- [a364176773](https://github.com/a364176773)
- [lvekee](https://github.com/lvekee)
- [caohdgege](https://github.com/caohdgege)
- [lightClouds917](https://github.com/lightClouds917)
- [objcoding](https://github.com/objcoding)
- [siyu](https://github.com/Pinocchio2018)
- [GoodBoyCoder](https://github.com/GoodBoyCoder)
- [pengten](https://github.com/pengten)
- [Bughue](https://github.com/Bughue)
- [doubleDimple](https://github.com/doubleDimple)
- [zhaoyuguang](https://github.com/zhaoyuguang)
- [liuqiufeng](https://github.com/liuqiufeng)
- [jsbxyyx](https://github.com/jsbxyyx)
- [lcmvs](https://github.com/lcmvs)
- [onlinechild](https://github.com/onlinechild)
- [xjlgod](https://github.com/xjlgod)
- [h-zhi](https://github.com/h-zhi)
- [tanzzj](https://github.com/tanzzj)
- [miaoxueyu](https://github.com/miaoxueyu)
- [selfishlover](https://github.com/selfishlover)
- [tuwenlin](https://github.com/tuwenlin)
- [dmego](https://github.com/dmego)
- [xiaochangbai](https://github.com/xiaochangbai)
- [Rubbernecker](https://github.com/Rubbernecker)
- [ruanun](https://github.com/ruanun)
- [huan415](https://github.com/huan415)
- [drgnchan](https://github.com/drgnchan)
- [cmonkey](https://github.com/cmonkey)
- [13414850431](https://github.com/13414850431)
- [ls9527](https://github.com/ls9527)
- [xingfudeshi](https://github.com/xingfudeshi)
- [spilledyear](https://github.com/spilledyear)
- [kaka2code](https://github.com/kaka2code)
- [iqinning](https://github.com/iqinning)
- [yujianfei1986](https://github.com/yujianfei1986)
- [elrond-g](https://github.com/elrond-g)
- [jameslcj](https://github.com/jameslcj)
- [zhouchuhang](https://github.com/zch0214)
- [xujj](https://github.com/XBNGit)
- [mengxzh](https://github.com/mengxzh)
- [portman](https://github.com/iportman)
- [anselleeyy](https://github.com/anselleeyy)
- [wangyuewen](https://github.com/2858917634)
- [imherewait](https://github.com/imherewait)
- [wfnuser](https://github.com/wfnuser)
- [zhixing](https://github.com/chenlei3641)
同时我们收到了社区反馈的很多有价值的issue和建议非常感谢大家。
#### Link
- **Seata:** https://github.com/seata/seata
- **Seata-Samples:** https://github.com/seata/seata-samples
- **Release:** https://github.com/seata/seata/releases
- **WebSite:** https://seata.io
</details>
### 1.4.2 (2021-04-26)
[source](https://github.com/seata/seata/archive/v1.4.2.zip) |

153
blog/zh-cn/iscas2023.md Normal file
View File

@ -0,0 +1,153 @@
---
title: 6大课题现已开放挑选 | 欢迎报名 Seata 开源之夏
author: Seata社区
date: 2023/05/12
keywords: 开源之夏、seata、分布式事务
---
# 6大课题现已开放挑选 | 欢迎报名 Seata 开源之夏
### 欢迎大家报名Seata 开源之夏2023课题
开源之夏 2023 学生报名期为 **4 月 29 日-6月4日**欢迎报名Seata 2023 课题!在这里,您将有机会深入探讨分布式事务的理论和应用,并与来自不同背景的同学一起合作完成实践项目。我们期待着您的积极参与和贡献,共同推动分布式事务领域的发展。
![summer2023-1](/img/blog/summer2023-1.jpg)
### 开源之夏2023
开源之夏是由中科院软件所“开源软件供应链点亮计划”发起并长期支持的一项暑期开源活动,旨在鼓励在校学生积极参与开源软件的开发维护,培养和发掘更多优秀的开发者,促进优秀开源软件社区的蓬勃发展,助力开源软件供应链建设。
参与学生通过远程线上协作方式,配有资深导师指导,参与到开源社区各组织项目开发中并收获奖金、礼品与证书。**这些收获,不仅仅是未来毕业简历上浓墨重彩的一笔,更是迈向顶尖开发者的闪亮起点,可以说非常值得一试。** 每个项目难度分为基础和进阶两档,对应学生结项奖金分别为税前人民币 8000 元和税前人民币 12000 元。
### Seata社区介绍
**Seata** 是一款开源的分布式事务解决方案GitHub获得超过23K+ Starts致力于在微服务架构下提供高性能和简单易用的分布式事务服务。在 Seata 开源之前Seata 在阿里内部一直扮演着分布式数据一致性的中间件角色几乎每笔交易都要使用Seata历经双11洪荒流量的洗礼对业务进行了有力的技术支撑。
### Seata社区开源之夏2023项目课题汇总
Seata社区为开源之夏2023组委会推荐6项精选项目课题您可以访问以下链接进行选报
https://summer-ospp.ac.cn/org/orgdetail/064c15df-705c-483a-8fc8-02831370db14?lang=zh
请及时与各导师沟通并准备项目申请材料,并登录官方注册申报(以下课题顺序不分先后):
![seata2023-2](/img/blog/summer2023-2.png)
#### 项目一: 实现用于服务发现和注册的NamingServer
**难度:** 进阶/Advanced
**项目社区导师:** 陈健斌
**导师联系邮箱:** 364176773@qq.com
**项目简述:**
目前seata的服务暴露及发现主要依赖于第三方注册中心随着项目的演进发展带来了额外的学习使用成本而业内主流具有服务端的中间件大多都开始演进自身的服务自闭环和控制及提供于服务端更高契合度和可靠性的组件或功能如kafka 的KRaftrocketmq的NameServerclickhouse的ClickHouse Keeper等.故为了解决如上问题和架构演进要求,seata需要构建自身的nameserver来保证更加稳定可靠。
**项目链接:**
https://summer-ospp.ac.cn/org/prodetail/230640380?list=org&navpage=org
<br/>
<br/>
#### 项目二: 在seata-go中实现saga事务模式
**难度:** 进阶/Advanced
**项目社区导师:** 刘月财
**导师联系邮箱:** luky116@apache.org
**项目简述:**
Saga模式是SEATA提供的长事务解决方案在Saga模式中业务流程中每个参与者都提交本地事务当出现某一个参与者失败则补偿前面已经成功的参与者一阶段正向服务和二阶段补偿服务都由业务开发实现。Seata-go 中当前没有支持saga模式希望后面参考Java版本的实现能将该功能支持上。
**项目链接:**
https://summer-ospp.ac.cn/org/prodetail/230640382?list=org&navpage=org
<br/>
<br/>
#### 项目三: seata saga模式产品化能力提升
**难度:** 进阶/Advanced
**项目社区导师:** 李宗杰
**导师联系邮箱:** leezongjie@163.com
**项目简述:**
saga作为分布式事务的解决方案之一在长事务上应用尤其广泛seata也提供了对应的状态机实现。随着业务的不断发展和接入对seata提出了更高的要求我们需要支持流式saga 编排,对当前状态机的实现进行优化和扩展,进一步服务业务。
**项目链接:**
https://summer-ospp.ac.cn/org/prodetail/230640415?list=org&navpage=org
<br/>
<br/>
#### 项目四: 增加控制台事务控制能力
**难度:** 进阶/Advanced
**项目社区导师:** 王良
**导师联系邮箱:** 841369634@qq.com
**项目简述:**
在分布式事务中经常会存在非常多的异常情况这些异常情况往往会导致系统无法继续运行。而这些异常往往需要人工介入排查原因并排除故障才能够使系统继续正常运行。虽然seata 提供了控制台查询事务数据但还未提供任何事务控制能力帮助排除故障。所以本课题主要是在seata服务端控制台上添加事务控制能力。
**项目链接:**
https://summer-ospp.ac.cn/org/prodetail/230640423?list=org&navpage=org
<br/>
<br/>
#### 项目五: 提高单测覆盖率和建立集成测试
**难度:** 基础/Basic
**项目社区导师:** 张嘉伟
**导师联系邮箱:** 349071347@qq.com
**项目简述:**
为了进一步提高项目的质量以及稳定性, 需要进一步提升项目单元测试覆盖率以及加入集成测试来模拟生产中不同的场景. 集成测试的目的是为了模拟client与server的交互过程, 而非单一的对某个接口进行测试。
**项目链接:**
https://summer-ospp.ac.cn/org/prodetail/230640424?list=org&navpage=org
<br/>
<br/>
#### 项目六: 实现Seata运维ctl工具
**难度:** 进阶/Advanced
**项目社区导师:** 季敏
**导师联系邮箱:** jimin.jm@alibaba-inc.com
**项目简述:** 运维ctl命令在Seata中非常重要它是Seata的命令行工具可以帮助我们管理和操作Seata的各种组件。运维ctl命令可以让我们快速地启动、停止和管理Seata服务定位和解决问题。此外运维ctl 命令还提供了丰富的指令可以让我们方便地检查Seata的健康状态、模拟事务和打印导出配置信息等大大提高了我们的工作效率和运维体验。
以下是对实现定制ctl运维命令行的一些建议
- 借鉴其他开源项目的实现方式比如kubectlhelm等并根据Seata的特点和需求进行定制。
- 将常用的运维操作直接封装进命令行,减少用户的手动操作。
- 考虑使用友好的命令和参数名称,将命令行设计得易于理解和记忆。
- 提供详细的帮助文档和示例,帮助用户快速上手和了解如何使用各种参数和选项。
- 考虑命令行的跨平台支持例如支持Windows、Linux和MacOS等操作系统。
一款好的ctl命令行应该是易用、灵活、可定制、健壮和易维护的。
项目链接https://summer-ospp.ac.cn/org/prodetail/230640431?list=org&navpage=org
<br/>
<br/>
### 如何参与开源之夏2023并快速选定项目
**欢迎通过上方联系方式,与各导师沟通并准备项目申请材料。**
课题参与期间学生可以在世界任何地方线上工作Seata相关项目结项需要在**9月30日**前以 PR 的形式提交到Seata社区仓库中并完成合并请务必尽早准备。
![seata2023-3](/img/blog/summer2023-3.png)
**需要在课题期间第一时间获取导师及其他信息,可扫码进入钉钉群交流** ——了解Seata社区各领域项目、结识Seata社区开源导师以助力后续申请。
<br/>
<img src="/img/blog/summer2023-4.jpg" height="290" width="250"/>
<br/>
#### 参考资料:
**Seata网站 :** https://seata.io/
**Seata GitHub :** https://github.com/seata
**开源之夏官网:** https://summer-ospp.ac.cn/org/orgdetail/ab188e59-fab8-468f-bc89-bdc2bd8b5e64?lang=zh
如果同学们对微服务其他领域项目感兴趣,也可以尝试申请,例如:
- 对于**微服务配置注册中心**有兴趣的同学,可以尝试填报[Nacos 开源之夏](https://nacos.io/zh-cn/blog/iscas2023.html)
- 对于**微服务框架和RPC框架**有兴趣的同学,可以尝试填报[Spring Cloud Alibaba 开源之夏](https://summer-ospp.ac.cn/org/orgdetail/41d68399-ed48-4d6d-9d4d-3ff4128dc132?lang=zh) 和 [Dubbo 开源之夏](https://summer-ospp.ac.cn/org/orgdetail/a7f6e2ad-4acc-47f8-9471-4e54b9a166a6?lang=zh)
- 对于**云原生网关**有兴趣的同学,可以尝试填报[Higress 开源之夏](https://higress.io/zh-cn/blog/ospp-2023)
- 对于**分布式高可用防护**有兴趣的同学,可以尝试填报 [Sentinel 开源之夏](https://summer-ospp.ac. cn/org/orgdetail/5e879522-bd90-4a8b-bf8b-b11aea48626b?lang=zh)
- 对于**微服务治理**有兴趣的同学,可以尝试填报 [OpenSergo 开源之夏](https://summer-ospp.ac. cn/org/orgdetail/aaff4eec-11b1-4375-997d-5eea8f51762b?lang=zh)。

88
blog/zh-cn/seata-1.5.2.md Normal file
View File

@ -0,0 +1,88 @@
---
title: Seata 1.5.2 重磅发布支持xid负载均衡
author: Seata社区
keywords: seata、分布式事务、1.5.2
description: Seata 1.5.2 重磅发布支持xid负载均衡
date: 2022/07/12
---
### Seata 1.5.2 重磅发布支持xid负载均衡
Seata 是一款开源的分布式事务解决方案,提供高性能和简单易用的分布式事务服务。
**seata-server 下载链接:**
[source](https://github.com/seata/seata/archive/v1.5.2.zip) |
[binary](https://github.com/seata/seata/releases/download/v1.5.2/seata-server-1.5.2.zip)
此版本更新如下:
### feature
- [[#4661](https://github.com/seata/seata/pull/4713)] 支持根据xid负载均衡算法
- [[#4676](https://github.com/seata/seata/pull/4676)] 支持Nacos作为注册中心时server通过挂载SLB暴露服务
- [[#4642](https://github.com/seata/seata/pull/4642)] 支持client批量请求并行处理
- [[#4567](https://github.com/seata/seata/pull/4567)] 支持where条件中find_in_set函数
### bugfix
- [[#4515](https://github.com/seata/seata/pull/4515)] 修复develop分支SeataTCCFenceAutoConfiguration在客户端未使用DB时启动抛出ClassNotFoundException的问题。
- [[#4661](https://github.com/seata/seata/pull/4661)] 修复控制台中使用PostgreSQL出现的SQL异常
- [[#4667](https://github.com/seata/seata/pull/4682)] 修复develop分支RedisTransactionStoreManager迭代时更新map的异常
- [[#4678](https://github.com/seata/seata/pull/4678)] 修复属性transport.enableRmClientBatchSendRequest没有配置的情况下缓存穿透的问题
- [[#4701](https://github.com/seata/seata/pull/4701)] 修复命令行参数丢失问题
- [[#4607](https://github.com/seata/seata/pull/4607)] 修复跳过全局锁校验的缺陷
- [[#4696](https://github.com/seata/seata/pull/4696)] 修复 oracle 存储模式时的插入问题
- [[#4726](https://github.com/seata/seata/pull/4726)] 修复批量发送消息时可能的NPE问题
- [[#4729](https://github.com/seata/seata/pull/4729)] 修复AspectTransactional.rollbackForClassName设置错误
- [[#4653](https://github.com/seata/seata/pull/4653)] 修复 INSERT_ON_DUPLICATE 主键为非数值异常
### optimize
- [[#4650](https://github.com/seata/seata/pull/4650)] 修复安全漏洞
- [[#4670](https://github.com/seata/seata/pull/4670)] 优化branchResultMessageExecutor线程池的线程数
- [[#4662](https://github.com/seata/seata/pull/4662)] 优化回滚事务监控指标
- [[#4693](https://github.com/seata/seata/pull/4693)] 优化控制台导航栏
- [[#4700](https://github.com/seata/seata/pull/4700)] 修复 maven-compiler-plugin 和 maven-resources-plugin 执行失败
- [[#4711](https://github.com/seata/seata/pull/4711)] 分离部署时 lib 依赖
- [[#4720](https://github.com/seata/seata/pull/4720)] 优化pom描述
- [[#4728](https://github.com/seata/seata/pull/4728)] 将logback版本依赖升级至1.2.9
- [[#4745](https://github.com/seata/seata/pull/4745)] 发行包中支持 mysql8 driver
- [[#4626](https://github.com/seata/seata/pull/4626)] 使用 `easyj-maven-plugin` 插件代替 `flatten-maven-plugin`插件,以修复`shade` 插件与 `flatten` 插件不兼容的问题
- [[#4629](https://github.com/seata/seata/pull/4629)] 更新globalSession状态时检查更改前后的约束关系
- [[#4662](https://github.com/seata/seata/pull/4662)] 优化 EnhancedServiceLoader 可读性
### test
- [[#4544](https://github.com/seata/seata/pull/4544)] 优化TransactionContextFilterTest中jackson包依赖问题
- [[#4731](https://github.com/seata/seata/pull/4731)] 修复 AsyncWorkerTest 和 LockManagerTest 的单测问题。
非常感谢以下 contributors 的代码贡献。若有无意遗漏,请报告。
<!-- 请确保您的 GitHub ID 在以下列表中 -->
- [slievrly](https://github.com/slievrly)
- [pengten](https://github.com/pengten)
- [YSF-A](https://github.com/YSF-A)
- [tuwenlin](https://github.com/tuwenlin)
- [2129zxl](https://github.com/2129zxl)
- [Ifdevil](https://github.com/Ifdevil)
- [wingchi-leung](https://github.com/wingchi-leung)
- [liurong](https://github.com/robynron)
- [opelok-z](https://github.com/opelok-z)
- [a364176773](https://github.com/a364176773)
- [Smery-lxm](https://github.com/Smery-lxm)
- [lvekee](https://github.com/lvekee)
- [doubleDimple](https://github.com/doubleDimple)
- [wangliang181230](https://github.com/wangliang181230)
- [Bughue](https://github.com/Bughue)
- [AYue-94](https://github.com/AYue-94)
- [lingxiao-wu](https://github.com/lingxiao-wu)
- [caohdgege](https://github.com/caohdgege)
同时我们收到了社区反馈的很多有价值的issue和建议非常感谢大家。
#### Link
- **Seata:** https://github.com/seata/seata
- **Seata-Samples:** https://github.com/seata/seata-samples
- **Release:** https://github.com/seata/seata/releases
- **WebSite:** https://seata.io

160
blog/zh-cn/seata-1.6.0.md Normal file
View File

@ -0,0 +1,160 @@
---
title: Seata 1.6.0 重磅发布,大幅提升性能
author: Seata社区
keywords: seata、分布式事务、1.6.0
description: Seata 1.6.0 重磅发布,大幅提升性能
date: 2022/12/17
---
### Seata 1.6.0 重磅发布,大幅提升性能
Seata 是一款开源的分布式事务解决方案,提供高性能和简单易用的分布式事务服务。
**seata-server 下载链接:**
[source](https://github.com/seata/seata/archive/v1.6.0.zip) |
[binary](https://github.com/seata/seata/releases/download/v1.6.0/seata-server-1.6.0.zip)
此版本更新如下:
### feature
- [[#4863](https://github.com/seata/seata/pull/4863)] 支持 oracle 和 postgresql 多主键
- [[#4649](https://github.com/seata/seata/pull/4649)] seata-server支持多注册中心
- [[#4779](https://github.com/seata/seata/pull/4779)] 支持 Apache Dubbo3
- [[#4479](https://github.com/seata/seata/pull/4479)] TCC注解支持添加在接口和实现类上
- [[#4877](https://github.com/seata/seata/pull/4877)] client sdk 支持jdk17
- [[#4914](https://github.com/seata/seata/pull/4914)] 支持 mysql 的update join联表更新语法
- [[#4542](https://github.com/seata/seata/pull/4542)] 支持 oracle timestamp 类型
- [[#5111](https://github.com/seata/seata/pull/5111)] 支持Nacos contextPath 配置
- [[#4802](https://github.com/seata/seata/pull/4802)] dockerfile 支持 arm64
### bugfix
- [[#4780](https://github.com/seata/seata/pull/4780)] 修复超时回滚成功后无法发送TimeoutRollbacked事件
- [[#4954](https://github.com/seata/seata/pull/4954)] 修复output表达式错误时保存执行结果空指针异常
- [[#4817](https://github.com/seata/seata/pull/4817)] 修复高版本springboot配置不标准的问题
- [[#4838](https://github.com/seata/seata/pull/4838)] 修复使用 Statement.executeBatch() 时无法生成undo log 的问题
- [[#4533](https://github.com/seata/seata/pull/4533)] 修复handleRetryRollbacking的event重复导致的指标数据不准确
- [[#4912](https://github.com/seata/seata/pull/4912)] 修复mysql InsertOnDuplicateUpdate 列名大小写不一致无法正确匹配
- [[#4543](https://github.com/seata/seata/pull/4543)] 修复对 Oracle 数据类型nclob的支持
- [[#4915](https://github.com/seata/seata/pull/4915)] 修复获取不到ServerRecoveryProperties属性的问题
- [[#4919](https://github.com/seata/seata/pull/4919)] 修复XID的port和address出现null:0的情况
- [[#4928](https://github.com/seata/seata/pull/4928)] 修复 rpcContext.getClientRMHolderMap NPE 问题
- [[#4953](https://github.com/seata/seata/pull/4953)] 修复InsertOnDuplicateUpdate可绕过修改主键的问题
- [[#4978](https://github.com/seata/seata/pull/4978)] 修复 kryo 支持循环依赖
- [[#4985](https://github.com/seata/seata/pull/4985)] 修复 undo_log id重复的问题
- [[#4874](https://github.com/seata/seata/pull/4874)] 修复OpenJDK 11 启动失败
- [[#5018](https://github.com/seata/seata/pull/5018)] 修复启动脚本中 loader path 使用相对路径导致 server 启动失败问题
- [[#5004](https://github.com/seata/seata/pull/5004)] 修复mysql update join行数据重复的问题
- [[#5032](https://github.com/seata/seata/pull/5032)] 修复mysql InsertOnDuplicateUpdate中条件参数填充位置计算错误导致的镜像查询SQL语句异常问题
- [[#5033](https://github.com/seata/seata/pull/5033)] 修复InsertOnDuplicateUpdate的SQL语句中无插入列字段导致的空指针问题
- [[#5038](https://github.com/seata/seata/pull/5038)] 修复SagaAsyncThreadPoolProperties冲突问题
- [[#5050](https://github.com/seata/seata/pull/5050)] 修复Saga模式下全局状态未正确更改成Committed问题
- [[#5052](https://github.com/seata/seata/pull/5052)] 修复update join条件中占位符参数问题
- [[#5031](https://github.com/seata/seata/pull/5031)] 修复InsertOnDuplicateUpdate中不应该使用null值索引作为查询条件
- [[#5075](https://github.com/seata/seata/pull/5075)] 修复InsertOnDuplicateUpdate无法拦截无主键和唯一索引的SQL
- [[#5093](https://github.com/seata/seata/pull/5093)] 修复seata server重启后accessKey丢失问题
- [[#5092](https://github.com/seata/seata/pull/5092)] 修复当seata and jpa共同使用时, AutoConfiguration的顺序不正确的问题
- [[#5109](https://github.com/seata/seata/pull/5109)] 修复当RM侧没有加@GlobalTransactional报NPE的问题
- [[#5098](https://github.com/seata/seata/pull/5098)] Druid 禁用 oracle implicit cache
- [[#4860](https://github.com/seata/seata/pull/4860)] 修复metrics tag覆盖问题
- [[#5028](https://github.com/seata/seata/pull/5028)] 修复 insert on duplicate SQL中 null 值问题
- [[#5078](https://github.com/seata/seata/pull/5078)] 修复SQL语句中无主键和唯一键拦截问题
- [[#5097](https://github.com/seata/seata/pull/5097)] 修复当Server重启时 accessKey 丢失问题
- [[#5131](https://github.com/seata/seata/pull/5131)] 修复XAConn处于active状态时无法回滚的问题
- [[#5134](https://github.com/seata/seata/pull/5134)] 修复hikariDataSource 自动代理在某些情况下失效的问题
- [[#5163](https://github.com/seata/seata/pull/5163)] 修复高版本JDK编译失败的问题
### optimize
- [[#4681](https://github.com/seata/seata/pull/4681)] 优化竞争锁过程
- [[#4774](https://github.com/seata/seata/pull/4774)] 优化 seataio/seata-server 镜像中的 mysql8 依赖
- [[#4750](https://github.com/seata/seata/pull/4750)] 优化AT分支释放全局锁不使用xid
- [[#4790](https://github.com/seata/seata/pull/4790)] 添加自动发布 OSSRH github action
- [[#4765](https://github.com/seata/seata/pull/4765)] mysql8.0.29版本及以上XA模式不持connection至二阶段
- [[#4797](https://github.com/seata/seata/pull/4797)] 优化所有github actions脚本
- [[#4800](https://github.com/seata/seata/pull/4800)] 添加 NOTICE 文件
- [[#4761](https://github.com/seata/seata/pull/4761)] 使用 hget 代替 RedisLocker 中的 hmget
- [[#4414](https://github.com/seata/seata/pull/4414)] 移除log4j依赖
- [[#4836](https://github.com/seata/seata/pull/4836)] 优化 BaseTransactionalExecutor#buildLockKey(TableRecords rowsIncludingPK) 方法可读性
- [[#4865](https://github.com/seata/seata/pull/4865)] 修复 Saga 可视化设计器 GGEditor 安全漏洞
- [[#4590](https://github.com/seata/seata/pull/4590)] 自动降级支持开关支持动态配置
- [[#4490](https://github.com/seata/seata/pull/4490)] tccfence 记录表优化成按索引删除
- [[#4911](https://github.com/seata/seata/pull/4911)] 添加 header 和license 检测
- [[#4917](https://github.com/seata/seata/pull/4917)] 升级 package-lock.json 修复漏洞
- [[#4924](https://github.com/seata/seata/pull/4924)] 优化 pom 依赖
- [[#4932](https://github.com/seata/seata/pull/4932)] 抽取部分配置的默认值
- [[#4925](https://github.com/seata/seata/pull/4925)] 优化 javadoc 注释
- [[#4921](https://github.com/seata/seata/pull/4921)] 修复控制台模块安全漏洞和升级 skywalking-eyes 版本
- [[#4936](https://github.com/seata/seata/pull/4936)] 优化存储配置的读取
- [[#4946](https://github.com/seata/seata/pull/4946)] 将获取锁时遇到的sql异常传递给客户端
- [[#4962](https://github.com/seata/seata/pull/4962)] 优化构建配置并修正docker镜像的基础镜像
- [[#4974](https://github.com/seata/seata/pull/4974)] 取消redis模式下,查询globalStatus数量的限制
- [[#4981](https://github.com/seata/seata/pull/4981)] 优化当tcc fence记录查不到时的错误提示
- [[#4995](https://github.com/seata/seata/pull/4995)] 修复mysql InsertOnDuplicateUpdate后置镜像查询SQL中重复的主键查询条件
- [[#5047](https://github.com/seata/seata/pull/5047)] 移除无用代码
- [[#5051](https://github.com/seata/seata/pull/5051)] 回滚时undolog产生脏写需要抛出不再重试(BranchRollbackFailed_Unretriable)的异常
- [[#5075](https://github.com/seata/seata/pull/5075)] 拦截没有主键及唯一索引值的insert on duplicate update语句
- [[#5104](https://github.com/seata/seata/pull/5104)] ConnectionProxy脱离对druid的依赖
- [[#5124](https://github.com/seata/seata/pull/5124)] 支持oracle删除TCC fence记录表
- [[#4468](https://github.com/seata/seata/pull/4968)] 支持kryo 5.3.0
- [[#4807](https://github.com/seata/seata/pull/4807)] 优化镜像和OSS仓库发布流水线
- [[#4445](https://github.com/seata/seata/pull/4445)] 优化事务超时判断
- [[#4958](https://github.com/seata/seata/pull/4958)] 优化超时事务 triggerAfterCommit() 的执行
- [[#4582](https://github.com/seata/seata/pull/4582)] 优化redis存储模式的事务排序
- [[#4963](https://github.com/seata/seata/pull/4963)] 增加 ARM64 流水线 CI 测试
- [[#4434](https://github.com/seata/seata/pull/4434)] 移除 seata-server CMS GC 参数
### test
- [[#4411](https://github.com/seata/seata/pull/4411)] 测试Oracle数据库AT模式下类型支持
- [[#4794](https://github.com/seata/seata/pull/4794)] 重构代码,尝试修复单元测试 `DataSourceProxyTest.getResourceIdTest()`
- [[#5101](https://github.com/seata/seata/pull/5101)] 修复zk注册和配置中心报ClassNotFoundException的问题 `DataSourceProxyTest.getResourceIdTest()`
非常感谢以下 contributors 的代码贡献。若有无意遗漏,请报告。
<!-- 请确保您的 GitHub ID 在以下列表中 -->
- [slievrly](https://github.com/slievrly)
- [renliangyu857](https://github.com/renliangyu857)
- [wangliang181230](https://github.com/wangliang181230)
- [a364176773](https://github.com/a364176773)
- [tuwenlin](https://github.com/tuwenlin)
- [conghuhu](https://github.com/conghuhu)
- [a1104321118](https://github.com/a1104321118)
- [duanqiaoyanyu](https://github.com/duanqiaoyanyu)
- [robynron](https://github.com/robynron)
- [lcmvs](https://github.com/lcmvs)
- [github-ganyu](https://github.com/github-ganyu)
- [1181954449](https://github.com/1181954449)
- [zw201913](https://github.com/zw201913)
- [wingchi-leung](https://github.com/wingchi-leung)
- [AlexStocks](https://github.com/AlexStocks)
- [liujunlin5168](https://github.com/liujunlin5168)
- [pengten](https://github.com/pengten)
- [liuqiufeng](https://github.com/liuqiufeng)
- [yujianfei1986](https://github.com/yujianfei1986)
- [Bughue](https://github.com/Bughue)
- [AlbumenJ](https://github.com/AlbumenJ)
- [doubleDimple](https://github.com/doubleDimple)
- [jsbxyyx](https://github.com/jsbxyyx)
- [tuwenlin](https://github.com/tuwenlin)
- [CrazyLionLi](https://github.com/JavaLionLi)
- [whxxxxx](https://github.com/whxxxxx)
- [neillee95](https://github.com/neillee95)
- [crazy-sheep](https://github.com/crazy-sheep)
- [zhangzq7](https://github.com/zhangzq7)
- [l81893521](https://github.com/l81893521)
- [zhuyoufeng](https://github.com/zhuyoufeng)
- [xingfudeshi](https://github.com/xingfudeshi)
- [odidev](https://github.com/odidev)
- [miaoxueyu](https://github.com/miaoxueyu)
同时我们收到了社区反馈的很多有价值的issue和建议非常感谢大家。
#### Link
- **Seata:** https://github.com/seata/seata
- **Seata-Samples:** https://github.com/seata/seata-samples
- **Release:** https://github.com/seata/seata/releases
- **WebSite:** https://seata.io

View File

@ -327,7 +327,7 @@ Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class
## 4.2 TCC 模式
* 文档:[《Seata 文档 —— TCC 模式》](http://127.0.0.1:8080/zh-cn/docs/dev/mode/tcc-mode.html)
* 文档:[《Seata 文档 —— TCC 模式》](https://seata.io/zh-cn/docs/dev/mode/tcc-mode.html)
* 示例:<https://github.com/seata/seata-samples/blob/master/tcc>
## 4.3 Saga 模式

View File

@ -0,0 +1,336 @@
---
title: 阿里 Seata 新版本终于解决了 TCC 模式的幂等、悬挂和空回滚问题
author: 朱晋君
keywords: Seata、TCC、幂等、悬挂、空回滚
description: Seata 在 1.5.1 版本解决了 TCC 模式的幂等、悬挂和空回滚问题,这篇文章主要讲解 Seata 是怎么解决的。
date: 2022/06/25
---
今天来聊一聊阿里巴巴 Seata 新版本1.5.1)是怎么解决 TCC 模式下的幂等、悬挂和空回滚问题的。
## 1 TCC 回顾
TCC 模式是最经典的分布式事务解决方案它将分布式事务分为两个阶段来执行try 阶段对每个分支事务进行预留资源,如果所有分支事务都预留资源成功,则进入 commit 阶段提交全局事务,如果有一个节点预留资源失败则进入 cancel 阶段回滚全局事务。
以传统的订单、库存、账户服务为例,在 try 阶段尝试预留资源,插入订单、扣减库存、扣减金额,这三个服务都是要提交本地事务的,这里可以把资源转入中间表。在 commit 阶段,再把 try 阶段预留的资源转入最终表。而在 cancel 阶段,把 try 阶段预留的资源进行释放,比如把账户金额返回给客户的账户。
**注意try 阶段必须是要提交本地事务的,比如扣减订单金额,必须把钱从客户账户扣掉,如果不扣掉,在 commit 阶段客户账户钱不够了,就会出问题。**
### 1.1 try-commit
try 阶段首先进行预留资源,然后在 commit 阶段扣除资源。如下图:
![fence-try-commit](/img/blog/fence-try-commit.png)
### 1.2 try-cancel
try 阶段首先进行预留资源,预留资源时扣减库存失败导致全局事务回滚,在 cancel 阶段释放资源。如下图:
![fence-try-cancel](/img/blog/fence-try-cancel.png)
## 2 TCC 优势
TCC 模式最大的优势是效率高。TCC 模式在 try 阶段的锁定资源并不是真正意义上的锁定,而是真实提交了本地事务,将资源预留到中间态,并不需要阻塞等待,因此效率比其他模式要高。
同时 TCC 模式还可以进行如下优化:
### 2.1 异步提交
try 阶段成功后,不立即进入 confirm/cancel 阶段,而是认为全局事务已经结束了,启动定时任务来异步执行 confirm/cancel扣减或释放资源这样会有很大的性能提升。
### 2.2 同库模式
TCC 模式中有三个角色:
- TM管理全局事务包括开启全局事务提交/回滚全局事务;
- RM管理分支事务
- TC: 管理全局事务和分支事务的状态。
下图来自 Seata 官网:
![fence-fiffrent-db](/img/blog/fence-fiffrent-db.png)
TM 开启全局事务时RM 需要向 TC 发送注册消息TC 保存分支事务的状态。TM 请求提交或回滚时TC 需要向 RM 发送提交或回滚消息。这样包含两个个分支事务的分布式事务中TC 和 RM 之间有四次 RPC。
优化后的流程如下图:
![fence-same-db](/img/blog/fence-same-db.png)
TC 保存全局事务的状态。TM 开启全局事务时RM 不再需要向 TC 发送注册消息而是把分支事务状态保存在了本地。TM 向 TC 发送提交或回滚消息后RM 异步线程首先查出本地保存的未提交分支事务,然后向 TC 发送消息获取(本地分支事务)所在的全局事务状态,以决定是提交还是回滚本地事务。
这样优化后RPC 次数减少了 50%,性能大幅提升。
## 3 RM 代码示例
以库存服务为例RM 库存服务接口代码如下:
```Java
@LocalTCC
public interface StorageService {
/**
* 扣减库存
* @param xid 全局xid
* @param productId 产品id
* @param count 数量
* @return
*/
@TwoPhaseBusinessAction(name = "storageApi", commitMethod = "commit", rollbackMethod = "rollback", useTCCFence = true)
boolean decrease(String xid, Long productId, Integer count);
/**
* 提交事务
* @param actionContext
* @return
*/
boolean commit(BusinessActionContext actionContext);
/**
* 回滚事务
* @param actionContext
* @return
*/
boolean rollback(BusinessActionContext actionContext);
}
```
通过 @LocalTCC 这个注解RM 初始化的时候会向 TC 注册一个分支事务。在 try 阶段的方法decrease方法上有一个 @TwoPhaseBusinessAction 注解,这里定义了分支事务的 resourceIdcommit 方法和 cancel 方法useTCCFence 这个属性下一节再讲。
## 4 TCC 存在问题
TCC 模式中存在的三大问题是幂等、悬挂和空回滚。在 Seata1.5.1 版本中,增加了一张事务控制表,表名是 tcc_fence_log 来解决这个问题。而在上一节 @TwoPhaseBusinessAction 注解中提到的属性 useTCCFence 就是来指定是否开启这个机制,这个属性值默认是 false。
tcc_fence_log 建表语句如下MySQL 语法):
```SQL
CREATE TABLE IF NOT EXISTS `tcc_fence_log`
(
`xid` VARCHAR(128) NOT NULL COMMENT 'global id',
`branch_id` BIGINT NOT NULL COMMENT 'branch id',
`action_name` VARCHAR(64) NOT NULL COMMENT 'action name',
`status` TINYINT NOT NULL COMMENT 'status(tried:1;committed:2;rollbacked:3;suspended:4)',
`gmt_create` DATETIME(3) NOT NULL COMMENT 'create time',
`gmt_modified` DATETIME(3) NOT NULL COMMENT 'update time',
PRIMARY KEY (`xid`, `branch_id`),
KEY `idx_gmt_modified` (`gmt_modified`),
KEY `idx_status` (`status`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4;
```
### 4.1 幂等
在 commit/cancel 阶段,因为 TC 没有收到分支事务的响应,需要进行重试,这就要分支事务支持幂等。
我们看一下新版本是怎么解决的。下面的代码在 TCCResourceManager 类:
```Java
@Override
public BranchStatus branchCommit(BranchType branchType, String xid, long branchId, String resourceId,
String applicationData) throws TransactionException {
TCCResource tccResource = (TCCResource)tccResourceCache.get(resourceId);
//省略判断
Object targetTCCBean = tccResource.getTargetBean();
Method commitMethod = tccResource.getCommitMethod();
//省略判断
try {
//BusinessActionContext
BusinessActionContext businessActionContext = getBusinessActionContext(xid, branchId, resourceId,
applicationData);
Object[] args = this.getTwoPhaseCommitArgs(tccResource, businessActionContext);
Object ret;
boolean result;
//注解 useTCCFence 属性是否设置为 true
if (Boolean.TRUE.equals(businessActionContext.getActionContext(Constants.USE_TCC_FENCE))) {
try {
result = TCCFenceHandler.commitFence(commitMethod, targetTCCBean, xid, branchId, args);
} catch (SkipCallbackWrapperException | UndeclaredThrowableException e) {
throw e.getCause();
}
} else {
//省略逻辑
}
LOGGER.info("TCC resource commit result : {}, xid: {}, branchId: {}, resourceId: {}", result, xid, branchId, resourceId);
return result ? BranchStatus.PhaseTwo_Committed : BranchStatus.PhaseTwo_CommitFailed_Retryable;
} catch (Throwable t) {
//省略
return BranchStatus.PhaseTwo_CommitFailed_Retryable;
}
}
```
上面的代码可以看到,执行分支事务提交方法时,首先判断 useTCCFence 属性是否为 true如果为 true则走 TCCFenceHandler 类中的 commitFence 逻辑,否则走普通提交逻辑。
TCCFenceHandler 类中的 commitFence 方法调用了 TCCFenceHandler 类的 commitFence 方法,代码如下:
```Java
public static boolean commitFence(Method commitMethod, Object targetTCCBean,
String xid, Long branchId, Object[] args) {
return transactionTemplate.execute(status -> {
try {
Connection conn = DataSourceUtils.getConnection(dataSource);
TCCFenceDO tccFenceDO = TCC_FENCE_DAO.queryTCCFenceDO(conn, xid, branchId);
if (tccFenceDO == null) {
throw new TCCFenceException(String.format("TCC fence record not exists, commit fence method failed. xid= %s, branchId= %s", xid, branchId),
FrameworkErrorCode.RecordAlreadyExists);
}
if (TCCFenceConstant.STATUS_COMMITTED == tccFenceDO.getStatus()) {
LOGGER.info("Branch transaction has already committed before. idempotency rejected. xid: {}, branchId: {}, status: {}", xid, branchId, tccFenceDO.getStatus());
return true;
}
if (TCCFenceConstant.STATUS_ROLLBACKED == tccFenceDO.getStatus() || TCCFenceConstant.STATUS_SUSPENDED == tccFenceDO.getStatus()) {
if (LOGGER.isWarnEnabled()) {
LOGGER.warn("Branch transaction status is unexpected. xid: {}, branchId: {}, status: {}", xid, branchId, tccFenceDO.getStatus());
}
return false;
}
return updateStatusAndInvokeTargetMethod(conn, commitMethod, targetTCCBean, xid, branchId, TCCFenceConstant.STATUS_COMMITTED, status, args);
} catch (Throwable t) {
status.setRollbackOnly();
throw new SkipCallbackWrapperException(t);
}
});
}
```
从代码中可以看到,提交事务时首先会判断 tcc_fence_log 表中是否已经有记录,如果有记录,则判断事务执行状态并返回。这样如果判断到事务的状态已经是 STATUS_COMMITTED就不会再次提交保证了幂等。如果 tcc_fence_log 表中没有记录,则插入一条记录,供后面重试时判断。
Rollback 的逻辑跟 commit 类似,逻辑在类 TCCFenceHandler 的 rollbackFence 方法。
### 4.2 空回滚
如下图,账户服务是两个节点的集群,在 try 阶段账户服务 1 这个节点发生了故障try 阶段在不考虑重试的情况下,全局事务必须要走向结束状态,这样就需要在账户服务上执行一次 cancel 操作。
![fence-empty-rollback](/img/blog/fence-empty-rollback.png)
Seata 的解决方案是在 try 阶段 往 tcc_fence_log 表插入一条记录status 字段值是 STATUS_TRIED在 Rollback 阶段判断记录是否存在,如果不存在,则不执行回滚操作。代码如下:
```Java
//TCCFenceHandler 类
public static Object prepareFence(String xid, Long branchId, String actionName, Callback<Object> targetCallback) {
return transactionTemplate.execute(status -> {
try {
Connection conn = DataSourceUtils.getConnection(dataSource);
boolean result = insertTCCFenceLog(conn, xid, branchId, actionName, TCCFenceConstant.STATUS_TRIED);
LOGGER.info("TCC fence prepare result: {}. xid: {}, branchId: {}", result, xid, branchId);
if (result) {
return targetCallback.execute();
} else {
throw new TCCFenceException(String.format("Insert tcc fence record error, prepare fence failed. xid= %s, branchId= %s", xid, branchId),
FrameworkErrorCode.InsertRecordError);
}
} catch (TCCFenceException e) {
//省略
} catch (Throwable t) {
//省略
}
});
}
```
在 Rollback 阶段的处理逻辑如下:
```Java
//TCCFenceHandler 类
public static boolean rollbackFence(Method rollbackMethod, Object targetTCCBean,
String xid, Long branchId, Object[] args, String actionName) {
return transactionTemplate.execute(status -> {
try {
Connection conn = DataSourceUtils.getConnection(dataSource);
TCCFenceDO tccFenceDO = TCC_FENCE_DAO.queryTCCFenceDO(conn, xid, branchId);
// non_rollback
if (tccFenceDO == null) {
//不执行回滚逻辑
return true;
} else {
if (TCCFenceConstant.STATUS_ROLLBACKED == tccFenceDO.getStatus() || TCCFenceConstant.STATUS_SUSPENDED == tccFenceDO.getStatus()) {
LOGGER.info("Branch transaction had already rollbacked before, idempotency rejected. xid: {}, branchId: {}, status: {}", xid, branchId, tccFenceDO.getStatus());
return true;
}
if (TCCFenceConstant.STATUS_COMMITTED == tccFenceDO.getStatus()) {
if (LOGGER.isWarnEnabled()) {
LOGGER.warn("Branch transaction status is unexpected. xid: {}, branchId: {}, status: {}", xid, branchId, tccFenceDO.getStatus());
}
return false;
}
}
return updateStatusAndInvokeTargetMethod(conn, rollbackMethod, targetTCCBean, xid, branchId, TCCFenceConstant.STATUS_ROLLBACKED, status, args);
} catch (Throwable t) {
status.setRollbackOnly();
throw new SkipCallbackWrapperException(t);
}
});
}
```
updateStatusAndInvokeTargetMethod 方法执行的 sql 如下:
```sql
update tcc_fence_log set status = ?, gmt_modified = ?
where xid = ? and branch_id = ? and status = ? ;
```
可见就是把 tcc_fence_log 表记录的 status 字段值从 STATUS_TRIED 改为 STATUS_ROLLBACKED如果更新成功就执行回滚逻辑。
### 4.3 悬挂
悬挂是指因为网络问题RM 开始没有收到 try 指令,但是执行了 Rollback 后 RM 又收到了 try 指令并且预留资源成功,这时全局事务已经结束,最终导致预留的资源不能释放。如下图:
![fence-suspend](/img/blog/fence-suspend.png)
Seata 解决这个问题的方法是执行 Rollback 方法时先判断 tcc_fence_log 是否存在当前 xid 的记录,如果没有则向 tcc_fence_log 表插入一条记录,状态是 STATUS_SUSPENDED并且不再执行回滚操作。代码如下
```Java
public static boolean rollbackFence(Method rollbackMethod, Object targetTCCBean,
String xid, Long branchId, Object[] args, String actionName) {
return transactionTemplate.execute(status -> {
try {
Connection conn = DataSourceUtils.getConnection(dataSource);
TCCFenceDO tccFenceDO = TCC_FENCE_DAO.queryTCCFenceDO(conn, xid, branchId);
// non_rollback
if (tccFenceDO == null) {
//插入防悬挂记录
boolean result = insertTCCFenceLog(conn, xid, branchId, actionName, TCCFenceConstant.STATUS_SUSPENDED);
//省略逻辑
return true;
} else {
//省略逻辑
}
return updateStatusAndInvokeTargetMethod(conn, rollbackMethod, targetTCCBean, xid, branchId, TCCFenceConstant.STATUS_ROLLBACKED, status, args);
} catch (Throwable t) {
//省略逻辑
}
});
}
```
而后面执行 try 阶段方法时首先会向 tcc_fence_log 表插入一条当前 xid 的记录,这样就造成了主键冲突。代码如下:
```Java
//TCCFenceHandler 类
public static Object prepareFence(String xid, Long branchId, String actionName, Callback<Object> targetCallback) {
return transactionTemplate.execute(status -> {
try {
Connection conn = DataSourceUtils.getConnection(dataSource);
boolean result = insertTCCFenceLog(conn, xid, branchId, actionName, TCCFenceConstant.STATUS_TRIED);
//省略逻辑
} catch (TCCFenceException e) {
if (e.getErrcode() == FrameworkErrorCode.DuplicateKeyException) {
LOGGER.error("Branch transaction has already rollbacked before,prepare fence failed. xid= {},branchId = {}", xid, branchId);
addToLogCleanQueue(xid, branchId);
}
status.setRollbackOnly();
throw new SkipCallbackWrapperException(e);
} catch (Throwable t) {
//省略
}
});
}
```
**注意queryTCCFenceDO 方法 sql 中使用了 for update这样就不用担心 Rollback 方法中获取不到 tcc_fence_log 表记录而无法判断 try 阶段本地事务的执行结果了。**
## 5 总结
TCC 模式是分布式事务中非常重要的事务模式,但是幂等、悬挂和空回滚一直是 TCC 模式需要考虑的问题Seata 框架在 1.5.1 版本完美解决了这些问题。
对 tcc_fence_log 表的操作也需要考虑事务的控制Seata 使用了代理数据源,使 tcc_fence_log 表操作和 RM 业务操作在同一个本地事务中执行,这样就能保证本地操作和对 tcc_fence_log 的操作同时成功或失败。

View File

@ -67,7 +67,7 @@ public String doTransactionCommit(){
tccActionOne.prepare(null,"one");
//服务B事务参与者
tccActionTwo.prepare(null,"two");
}
}
```
以上就是使用 Seata TCC 模式实现一个全局事务的例子可以看出TCC 模式同样使用 `@GlobalTransactional` 注解开启全局事务,而服务 A 和服务 B 的 TCC 接口为事务参与者Seata 会把一个 TCC
@ -89,7 +89,7 @@ Seata 启动时会对 TCC 接口进行扫描并解析,如果 TCC 接口是一
## 资源解析
资源解析即是把 TCC 接口进行解析并注册前面说过TCC 接口可以是 PRC也可以是 JVM 内部调用,在 Seata TCC 模块中一个 remoting
资源解析即是把 TCC 接口进行解析并注册前面说过TCC 接口可以是 RPC也可以是 JVM 内部调用,在 Seata TCC 模块中一个 remoting
模块,该模块专门用于解析具有 `TwoPhaseBusinessAction` 注解的 TCC 接口资源:
![](https://gitee.com/objcoding/md-picture/raw/master/img/20220116175059.png)
@ -291,7 +291,7 @@ Seata 的做法是新增一个 TCC 事务控制表,包含事务的 XID 和 Bra
Seata 是如何处理幂等问题的呢?
同样的也是在 TCC 事务控制表中增加一个记录状态的字段 status该字段有 3 个值,分别为:
同样的也是在 TCC 事务控制表中增加一个记录状态的字段 status该字段有 3 个值,分别为:
1. tried1
2. committed2
@ -317,10 +317,9 @@ Seata 是怎么处理悬挂的呢?
1. suspended4
当执行二阶段 Cancel 方法时,如果发现 TCC 事务控制表有相关记录,说明二阶段 Cancel 方法优先一阶段 Try 方法执行,因此插入一条 status=4 状态的记录,当一阶段 Try 方法后面执行时,判断 status=4
,则说明有二阶段 Cancel 已执行,并返回 false 以阻止一阶段 Try 方法执行成功。
当执行二阶段 Cancel 方法时,如果发现 TCC 事务控制表没有相关记录,说明二阶段 Cancel 方法优先一阶段 Try 方法执行,因此插入一条 status=4 状态的记录,当一阶段 Try 方法后面执行时,判断 status=4 ,则说明有二阶段 Cancel 已执行,并返回 false 以阻止一阶段 Try 方法执行成功。
# 作者简介
张乘辉,目前就职于蚂蚁集团,热爱分享技术,微信公众号「后端进阶」作者,技术博客([https://objcoding.com/](https://objcoding.com/)博主Seata CommitterGitHub
IDobjcoding。
IDobjcoding。

View File

@ -46,7 +46,7 @@ TCC 的 Try 操作作为一阶段负责资源的检查和预留Confirm 操
在扣款场景下Confirm 阶段走的事情就是发生真正的扣款把A账户中已经冻结的 30 元钱扣掉。
* Cancel 操作:预留资源的是否;
* Cancel 操作:预留资源的是否释放
在扣款场景下扣款取消Cancel 操作执行的任务是释放 Try 操作冻结的 30 元钱,是 A 账户回到初始状态。

View File

@ -156,7 +156,7 @@ Got the after image:
}
```
6. Before local commit, the transaction submmit an application to TC to acquire a **global lock** for the record whose primary key equals 1 in the table product.
6. Before local commit, the transaction submit an application to TC to acquire a **global lock** for the record whose primary key equals 1 in the table product.
7. Commit local transaction: commit the update of PRODUCT table and the insert of UNDO_LOG table in the same local transaction.
8. Report the result of step 7 to TC.

View File

@ -10,9 +10,9 @@ The Seata Group takes a rigorous standpoint in annihilating the security issues
## REPORTING VULNERABILITY
If you have apprehensions regarding Seata's security or you discover vulnerability or potential threat, dont hesitate to get in touch with the Seata Security Team by dropping a mail at [dev-seata@googlegroups.com](mailto:dev-seata@googlegroups.com). In the mail, specify the description of the issue or potential threat. You are also urged to recommend the way to reproduce and replicate the issue. The Seata community will get back to you after assessing and analysing the findings.
If you have apprehensions regarding Seata's security or you discover vulnerability or potential threat, dont hesitate to get in touch with the Seata Security Team by reporting it to [ASRC(Alibaba Security Response Center)](https://security.alibaba.com/). In the report, specify the description of the issue or potential threat. You are also urged to recommend the way to reproduce and replicate the issue. The Seata community will get back to you after assessing and analysing the findings.
PLEASE PAY ATTENTION to report the security issue on the security email before disclosing it on public domain.
PLEASE PAY ATTENTION to report the security issue on [ASRC(Alibaba Security Response Center)](https://security.alibaba.com/) before disclosing it on public domain.
## VULNERABILITY HANDLING

View File

@ -4,40 +4,45 @@ keywords: Seata, Developers
description: Seata Team.
---
## Seata Team
## Seata Developers Team
This page shows Seata developers and continues to expand. The list is not prioritized.
# Seata Committer List
| name | github | company |
| ------ | --------------- | --------------- |
| Min Ji | [slievrly](https://github.com/slievrly) | Alibabba |
| Haiqiang Shen | [sharajava](https://github.com/sharajava) | Alibabba |
| Qipeng Li| [wlliqipeng](https://github.com/wlliqipeng) | Alibabba |
| Liandong Chen | [purple-force](https://github.com/purple-force) | Alibabba |
| Sen Zhang | [zhangthen](https://github.com/zhangthen) | Antfin |
| Geng Zhang | [ujjboy](https://github.com/ujjboy) | Antfin |
| Zhiyuan Lei | [leizhiyuan](https://github.com/leizhiyuan) | Antfin |
| Qing Wang | [jovany-wang](https://github.com/jovany-wang) | Antfin |
| Jiangke Wu | [xingfudeshi](https://github.com/xingfudeshi) | Truthai |
| Zhao Li | [CoffeeLatte007](https://github.com/CoffeeLatte007) | YuanFuDao |
| Xin Wang | [lovepoem](https://github.com/lovepoem) | WeiDian |
| Guoyao Yuan | [github-ygy](https://github.com/github-ygy) | Tuya |
| Xu Zhang | [zhangxu19830126](https://github.com/zhangxu19830126) | InfiniVision |
| Shuaipeng Ren | [niaoshuai](https://github.com/niaoshuai) | HuanQiuYouLu |
| Deyou Xu | [skyesx](https://github.com/skyesx) | WeBank |
| Jinlei Zhuang | [zjinlei](https://github.com/zjinlei) | Helios |
| Jiawei Zhang | [l81893521](https://github.com/l81893521) | Locals |
| Zhengtao Zhong | [jsbxyyx](https://github.com/jsbxyyx) | Shenzhen arts |
| Long Chen | [long187](https://github.com/long187) | Antfin |
| Yunsong Guo | [ggndnn](https://github.com/ggndnn) | FND |
### Seata Maintainer List
| 姓名 | github | 公司 |
| ------------ | ------------------------------------------- | ------- |
| Min Ji | [slievrly](https://github.com/slievrly) | Alibaba |
| Jianbin Chen | [a364176773](https://github.com/a364176773) | TongDun |
| Liang Wang | [wangliang181230](https://github.com/wangliang181230) | HuiKang |
| Huadong Cao | [caohdgege](https://github.com/caohdgege) | BEIKE |
### Seata Committer List
| name | github | company |
|-----------------| --------------- | --------------- |
| Haiqiang Shen | [sharajava](https://github.com/sharajava) | Alibaba |
| Rong Liu | [robynron](https://github.com/robynron) | Alibaba |
| Liandong Chen | [purple-force](https://github.com/purple-force) | Alibaba |
| Sen Zhang | [zhangthen](https://github.com/zhangthen) | Antfin |
| Geng Zhang | [ujjboy](https://github.com/ujjboy) | Antfin |
| Zhiyuan Lei | [leizhiyuan](https://github.com/leizhiyuan) | Tencent |
| Qing Wang | [jovany-wang](https://github.com/jovany-wang) | Baidu |
| Jiangke Wu | [xingfudeshi](https://github.com/xingfudeshi) | Truthai |
| Zhao Li | [CoffeeLatte007](https://github.com/CoffeeLatte007) | YuanFuDao |
| Xin Wang | [lovepoem](https://github.com/lovepoem) | JD |
| Guoyao Yuan | [github-ygy](https://github.com/github-ygy) | NetEase |
| Xu Zhang | [zhangxu19830126](https://github.com/zhangxu19830126) | InfiniVision |
| Shuaipeng Ren | [niaoshuai](https://github.com/niaoshuai) | HuanQiuYouLu |
| Deyou Xu | [skyesx](https://github.com/skyesx) | Alibaba |
| Jinlei Zhuang | [zjinlei](https://github.com/zjinlei) | Helios |
| Jiawei Zhang | [l81893521](https://github.com/l81893521) | DaShenLin |
| Zhengtao Zhong | [jsbxyyx](https://github.com/jsbxyyx) | Shenzhen arts |
| Long Chen | [long187](https://github.com/long187) | Unknown |
| Yunsong Guo | [ggndnn](https://github.com/ggndnn) | FND |
| Liang Wang | [wangliang181230](https://github.com/wangliang181230) | HuiKang |
| Huadong Cao | [caohdgege](https://github.com/caohdgege) | BEIKE |
| Zhongxiang Wang | [lightClouds917](https://github.com/lightClouds917) | TongDun |
| XiaoMin Liu | [dk-lockdown](https://github.com/dk-lockdown) | cestc |
| Chenghui Zhang | [objcoding](https://github.com/objcoding) | Ant Group |
| XiaoMin Liu | [dk-lockdown](https://github.com/dk-lockdown) | cestc |
| Chenghui Zhang | [objcoding](https://github.com/objcoding) | Ant Group |
| Liangyu Ren | [renliangyu857](https://github.com/renliangyu857) | XW Bank |
## Seata Developer Roles
@ -66,4 +71,15 @@ Contributor is an individual who contributes to the Seata project. The standard
* Submitted a PR that is merged.
## Contributions Guide
### Contributor Guide
* [New Contributor Guide](./contributor-guide/new-contributor-guide_dev.html)
* [Test Coverage Guide](./contributor-guide/test-coverage-guide_dev.html)
* [Reporting Security Issues](./contributor-guide/reporting-security-issues_dev.html)
* [Contributing](./guide_dev.html)
### Committer Guide
* [Label An Issue](./committer-guide/label-an-issue-guide_dev.html)
* [Website Guide](./committer-guide/website-guide_dev.html)
* [Release Guide](./committer-guide/release-guide_dev.html)

View File

@ -4,11 +4,15 @@ title: Deploy Seata Server By Kubernetes
keywords: kubernetes,ops
description: Deploy Seata Server By Kubernetes
author: helloworlde
date: 2019-12-01
date: 2022-07-23
---
# Deploy Seata Server By Kubernetes
### Last Updated
- 2022.07.23 适配 Seata 1.5.x 增加控制台默认端口7091seata-sever 在1.5.x 以下版本读取conf配置更改为yml配置文件。
### Quick Start
Create file `seata-server.yaml`
@ -27,7 +31,11 @@ spec:
- port: 8091
nodePort: 30091
protocol: TCP
name: http
name: service
- port: 7091
nodePort: 30092
protocol: TCP
name: console
selector:
k8s-app: seata-server
@ -60,9 +68,12 @@ spec:
- name: STORE_MODE
value: file
ports:
- name: http
- name: service
containerPort: 8091
protocol: TCP
- name: console
containerPort: 7091
protocol: TCP
```
@ -107,11 +118,14 @@ spec:
imagePullPolicy: IfNotPresent
env:
- name: SEATA_CONFIG_NAME
value: file:/root/seata-config/registry
value: file:/seata-server/conf/
ports:
- name: http
- name: service
containerPort: 8091
protocol: TCP
- name: console
containerPort: 7091
protocol: TCP
volumeMounts:
- name: seata-config
mountPath: /root/seata-config
@ -120,6 +134,8 @@ spec:
configMap:
name: seata-server-config
---
1.5.x 以下版本 ConfigMap
---
apiVersion: v1
kind: ConfigMap
@ -131,14 +147,85 @@ data:
type = "nacos"
nacos {
application = "seata-server"
serverAddr = "192.168.199.2"
serverAddr = "127.0.0.1:8848"
}
}
config {
type = "nacos"
nacos {
serverAddr = "192.168.199.2"
serverAddr = "127.0.0.1:8848"
group = "SEATA_GROUP"
}
}
---
1.5.x 版本 ConfigMap
---
apiVersion: v1
kind: ConfigMap
metadata:
name: seata-server-config
data:
application.yml: |
server:
port: 7091
spring:
application:
name: seata-server
logging:
config: classpath:logback-spring.xml
file:
path: ${user.home}/logs/seata
console:
user:
username: seata
password: seata
seata:
config:
# support: nacos, consul, apollo, zk, etcd3
type: nacos
nacos:
server-addr: 127.0.0.1:8848
group: SEATA_GROUP
username: xxx
password: xxx
##if use MSE Nacos with auth, mutex with username/password attribute
#access-key: ""
#secret-key: ""
data-id: seataServer.properties
registry:
# support: nacos, eureka, redis, zk, consul, etcd3, sofa
type: nacos
nacos:
application: seata-server
server-addr: 127.0.0.1:8848
group: SEATA_GROUP
cluster: default
username: xxx
password: xxx
##if use MSE Nacos with auth, mutex with username/password attribute
#access-key: ""
#secret-key: ""
store:
# support: file 、 db 、 redis
mode: db
db:
datasource: druid
db-type: mysql
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://xxx:3306/seata
user: xxx
password: xxx
min-conn: 5
max-conn: 100
security:
secretKey: SeataSecretKey0c382ef121d778043159209298fd40bf3850a017
tokenValidityInMilliseconds: 1800000
ignore:
urls: /,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/api/v1/auth/login
```

View File

@ -105,11 +105,11 @@ supported from version 0.6, tc USES db mode to share global transaction session
**A:**
Since seata phase 1 local transactions have been committed, enhanced isolation is needed to prevent other transactions from dirty reads and dirty writes.
1. Dirty read Select statement with for update, proxy method with @GlobalLock+@Transactional or @GlobalTransaction
2. Dirty write You must use @globaltransaction
2. Dirty write You must use @GlobalTransactional
noteIf the interface of the business you are querying does not use the @globaltransactional annotation, which means there is no need for distributed transactions on the method, you can annotate the @globallock+@Transactional annotation on the method and add a for update statement to the query.
If your query interface has the @globaltransactional annotation on the outer edge of the transactional link, you can simply add a for update statement to your query. The reason for designing this annotation is that before it is available, distributed transactions need to query the committed data, but the business does not need distributed transactions.
Using the GlobalTransactional annotation adds some unnecessary additional RPC overhead such as begin returning xid, commit transaction, etc. GlobalLock simplifies the RPC process for higher performance.
noteIf the interface of the business you are querying does not use the @GlobalTransactional annotation, which means there is no need for distributed transactions on the method, you can annotate the @globallock+@Transactional annotation on the method and add a for update statement to the query.
If your query interface has the @GlobalTransactional annotation on the outer edge of the transactional link, you can simply add a for update statement to your query. The reason for designing this annotation is that before it is available, distributed transactions need to query the committed data, but the business does not need distributed transactions.
Using the @GlobalTransactional annotation adds some unnecessary additional RPC overhead such as begin returning xid, commit transaction, etc. GlobalLock simplifies the RPC process for higher performance.
********
<h3 id='5'>Q: 5.When Failed to roll back dirty data, what shall I do ?</h3>
@ -133,7 +133,7 @@ This exception can occur in the following situations (you can continue to add).
1. The branch transaction is asynchronous. The global transaction is not aware of its progress. The global transaction has entered phase 2 before the asynchronous branch comes to register.
2. Service a rpc service b timed out (dubbo, feign, etc. timeout by default for 1 second), a throws an exception to tm, tm informs tc to roll back, but b still receives the request (network delay or rpc framework retry), and then registers at tc Global transaction was found to be rolling back.
3. Tc is aware of the global transaction timeout (@globaltransactional (timeoutMills = default 60 seconds)), actively changes the state and notifies each branch transaction to rollback when a new branch transaction is registered.
3. Tc is aware of the global transaction timeout (@GlobalTransactional (timeoutMills = default 60 seconds)), actively changes the state and notifies each branch transaction to rollback when a new branch transaction is registered.
********
<h3 id='7'>Q: 7.When Nacos is used as the Seata configuration center, the project startup error report cannot find the service. How to check and deal with it ?</h3>
@ -263,8 +263,8 @@ At present, `seata-all` needs to use conf type `conf` files, and `properties` an
**A:**
```html
AT mode: Dubbo, Spring Cloud, Motan, gRPC and sofa-RPC
TCC mode: Dubbo, Spring Cloud and sofa-RPC
Dubbo, Spring Cloud, Motan, gRPC , sofa-RPC , EDAS-HSF and bRPC
```
****
@ -328,7 +328,7 @@ The solution is currently twofold:
`@Transactional` can be coupled with `DataSourceTransactionManager` and `JTATransactionManager` to represent local transactions and XA distributed transactions, respectively. Common to everyone is the combination with local affairs.
When combined with local transactions`@Transactial` and `@GlobalTransaction` are hyphenated,`@ Transactial` can only be located in the same method hierarchy annotated at `@GlobalTransaction` or within the inner layer of `@GlobalTransaction` annotation methods.
When combined with local transactions`@Transactial` and `@GlobalTransactional` are hyphenated,`@Transactial` can only be located in the same method hierarchy annotated at `@GlobalTransaction` or within the inner layer of `@GlobalTransaction` annotation methods.
Here the concept of distributed transactions is larger than local transactions, annotating `@Transactional` outside results in a distributed transaction empty submission, a global transaction being submitted when the `@Transactional` corresponding connection submission is declared or the XID of the global transaction is absent.
@ -466,4 +466,4 @@ This is because the seata source code was compiled and then the local seata depe
Solution:
- Make sure that the JDK version is 1.8 when compiling seata source code to avoid compatibility issues
- If you have compiled the source code of seata with JDK 11, please delete all packages under the io.seata path in the local maven repository. Then recompile your project and let the project re-pull the seata dependency package of the central warehouse
- If you have compiled the source code of seata with JDK 11, please delete all packages under the io.seata path in the local maven repository. Then recompile your project and let the project re-pull the seata dependency package of the central warehouse

View File

@ -156,7 +156,7 @@ Got the after image:
}
```
6. Before local commit, the transaction submmit an application to TC to acquire a **global lock** for the record whose primary key equals 1 in the table product.
6. Before local commit, the transaction submit an application to TC to acquire a **global lock** for the record whose primary key equals 1 in the table product.
7. Commit local transaction: commit the update of PRODUCT table and the insert of UNDO_LOG table in the same local transaction.
8. Report the result of step 7 to TC.

View File

@ -0,0 +1,520 @@
---
Title: Seata parameter configuration
keywords: Seata
Description: Seata parameter configuration.
---
#The seata parameter configuration version 1.6.0
<a href="./configurations100. html">View version 1.0.0</a>
<a href="./configurations090. html">View versions before 0.9.0.1</a>
###Change record
```
20201216(1.6.0):
The change records of configuration items from 1.4.0 to 1.6.0 are no longer maintained in a centralized manner. Please check the changes of relevant versions separately according to the configuration items
20200716(1.3.0):
1. Added the relevant configuration of store.redis
2. The nacos registry configuration group item has been added, and the values of the Server and Client must be consistent
3. Add the client.rm.sagaBranchRegisterEnable configuration item, which is false by default
20200421(1.2.0):
1. Add the registry.nacos.application attribute. The default value is seata server. The values on the server and client sides must be consistent
20200220(1.1.0):
1. The formats in the file.conf and registry.conf configuration files are uniformly converted to the hump format
2. Unify the default values of all configuration files (file.conf, registry.conf, seata spring boot starter)
3. Optimize the configuration of transaction grouping and TC cluster in seata spring boot starter
4. Remove client.support.spring.datasource.autoproxy and add @ EnableAutoDataSourceProxy
5. Add server.rollbackRetryTimeoutUnlockEnable configuration item, which is false by default
6. Add the transport.shutdown.wait configuration item. The default is 3 seconds
The annotation is used to enable the automatic proxy of the data source, and the proxy implementation method can be selected (see Appendix 5 for details)
20191221:
1. Add seata.enabled, client.report.success.enable
transport.enable-client-batch-send-request、client.log.exceptionRate
```
##Attention attribute (see all attributes for detailed description)
|Server side | client side|
|---------------|------------|
| registry. type |registry.type|
| config. type |config.type|
| #store. Mode=db requires the following configuration | service.vgroupMapping.my_ test_ tx_ group|
| store.db. driverClassName | service.default. grouplist |
| store.db. url |service. disableGlobalTransaction |
| store.db. user | |
| store.db. password | |
| #store. Mode=Redis requires the following configurations ||
| store.redis. host | |
| store.redis. port | |
| store.redis. database | |
| store.redis. password | |
##All attributes
###Public sector
| key | desc | remark| change record |
|---------------|--------------|----|----------------------------|
|transport.type | Socket communication mode | TCP, UNIX_ DOMAIN_ SOCKET, default TCP|
|transport. server | socket channel type | NIO, NATIVE (select KQueue or Epoll according to the operating system type and socket communication mode. Note that Windows only supports NIO, and NATIVE mode will throw an exception)|
|transport. enableTmClientBatchSendRequest | TM Batch Send Request Message Switch | Default false | new in 1.5.1 version|
|transport. enableRmClientBatchSendRequest | RM Batch Send Request Message Switch | Default true | new in 1.5.1 version|
|transport. enableTcServerBatchSendResponse | TC Batch Send Reply Message Switch | Default false | new in 1.5.1 version|
|transport.rpcRmRequestTimeout | RM sending request timeout | 30 seconds by default | new in 1.5.1 version|
|transport.rpcTmRequestTimeout | TM sending request timeout | 30 seconds by default | new in 1.5.1 version|
|transport.rpcTcRequestTimeout | TC sending request timeout | 30 seconds by default | new in 1.5.1 version|
|transport.threadFactory. bossThreadSize | Netty communication model Boss group threads | Default 1|
|transport.threadFactory. workerThreadSize | Netty communication model Worker group threads | The number of threads can be configured or the number of threads in a specific thread working mode can be selected. There are four default working modes of threads: Auto (2 * CPU cores+1), Pin (CPU cores, applicable to computing intensive tasks), BusyPin (CPU cores+1, applicable to computing intensive and memory limited scenarios) Default (2 * CPU cores, applicable to IO intensive tasks), the default value is Default mode|
|transport. shutdown. wait | Time to wait for service offline before the Netty thread pool on the server is closed | 3 seconds by default|
|transport. serialization | Client and server communication codec method | data (ByteBuf), protobuf, kryo, session, fst, default data|
|transport.compressor | Compression method of communication data between client and server | none, gzip, zip, sevenz, bzip2, lz4, deflater, zstd, default none | Before 1.2.0: gzip<br/>1.2.0: zip, sevenz, bzip2<br/>1.3.0: lz4<br/>1.4.1: deflater <br/> 1.5.1: zstd|
|transport. heartbeat | The heartbeat detection switch for client server communication | The default value is true|
|Registry.type | Registry type | Default file, supports file, nacos, redis, eureka, zk, consumer, etcd3, sofa, and custom | 1.6.0 Server supports simultaneous registration to multiple registries, separating registry names with commas|
|Config.type | Configuration center type | default file, supporting file, nacos, apollo, zk, consult, etcd3, springcloud, custom|
###Server side
| key| desc | remark| change record |
|-------------------------------------------|---------------------------------|----------------------------|----------------|
| server.undo.logSaveDays | undo retention days | 7 days by default, log_ Status=1 (Appendix 3) and undo not normally cleaned|
| server.undo.logDeletePeriod | undo Cleanup Thread Interval | 86,400,000 by default, in milliseconds|
| server.maxCommitRetryTimeout | Timeout duration of two-phase commit retry | Unit: ms, s, m, h, d, corresponding to ms, s, min, h, day, default ms. The default value of - 1 means unlimited retries. Formula: timeout>=now globalTransactionBeginTime, true means no more retries after timeout (Note: no retries will be made after the timeout is reached, and there is a risk of data inconsistency, unless the business can calibrate the data itself, otherwise use with caution)|
| server.maxRollbackRetryTimeout | Phase2 rollback retry timeout duration | Same as commit|
| server.recovery.committingRetryPeriod | Phase2 commit unfinished status Global transaction retry commit thread interval | 1000 by default, in milliseconds|
| server.recovery.asyncCommittingRetryPeriod | Phase2 asynchronous submission status Retry submission thread interval | 1000 by default, in milliseconds|
| server.recovery.rollbackRetryPeriod | Phase2 rollback status Retry rollback thread interval | 1000 by default, in milliseconds|
| server.recovery.timeoutRetryPeriod | Timeout status detection retry thread interval | 1000 by default, in milliseconds. If timeout is detected, put the global transaction into the rollback session manager|
| server.rollbackRetryTimeoutUnlockEnable | Whether to release the lock after the two-phase rollback timeout | False by default|
| server.distributedLockExpireTime | Server side transaction management global lock timeout | 10000 by default, in milliseconds | new in 1.5.1 version|
| server.server.xaerNotaRetryTimeout | Retry timeout to prevent XA branch transactions from hanging | 60000 by default, in milliseconds | new in 1.5.1 version|
| server.session.branchAsyncQueueSize | Branch transaction session asynchronously deletes the thread pool queue size | 5000 by default | new in 1.5.1 version|
| server.session.enableBranchAsyncRemove | Asynchronous deletion switch of branch transaction session | Default false | new in 1.5.1 version|
| server.enableParallelRequestHandle | Parallel processing switch for batch request messages | Default false | new in 1.5.2 version|
| store.mode | Transaction session information storage mode | file Local file (HA is not supported), db database, redis (HA is supported) | The 1.5.1 version uses lock and session for separate storage|
| store.lock.mode | Transaction lock information storage method | file Local file (HA is not supported), db database, Redis (HA is supported); When the configuration is empty, take the store Mode configuration item value | New in 1.5.1 version, and session and lock can be stored separately|
| store.session.mode | Transaction echo information storage method | file Local file (HA is not supported), db database, Redis (HA is supported); When the configuration is empty, take the store Mode configuration item value | New in 1.5.1 version, and session and lock can be stored separately|
| store.publicKey | Public key for storing and decrypting passwords in db or Redis | | supported in version 1.4.2|
| store.file.dir | file mode file storage folder name | default sessionStore|
| store.file.maxBranchSessionSize | File mode file storage branch session maximum bytes | 16384 (16kb) by default, in bytes|
| store.file.maxGlobalSessionSize | File mode file stores the maximum number of global session bytes | 512b by default, in bytes|
| store.file.fileWriteBufferCacheSize | File mode file storage buffer maximum cache size | 16384 (16kb) by default, in bytes. When the amount of data such as session written is greater than this value, an exception will be thrown|
| store.file.flushDiskMode | file mode file storage flushing policy | default async, optional sync|
| store.file.sessionReloadReadSize | File mode File storage The maximum number of session or lock keys recovered from the backup file after the server node restarts | 100 by default|
| store.db.datasource | db mode data source type | dbcp, druid, hikari; No default value, store Must be specified when mode=db|
| store.db.dbType | db mode database type | mysql, oracle, db2, sqlserver, sybaee, h2, sqlite, access, postgresql, oceanbase; No default value, store Mode=db must be specified|
| store.db.driverClassName | db mode database driver | store Must be specified when mode=db|
| store.db.url | db mode database url | store When mode=db, it must be specified. When using MySQL as the data source, it is recommended to add 'rewriteBatchedStatements=true' to the connection parameters (see Appendix 7 for detailed reasons)|
| store.db.user | db mode database account | store Must be specified when mode=db|
| store.db.password | db mode database account password | store Must be specified when mode=db|
| store.db.minConn | initial connections of db mode database | 1 by default|
| store.db.maxConn | maximum number of connections to database in db mode | 20 by default|
| store.db.maxWait | the maximum waiting time for db mode to obtain a connection | 5000 by default, in milliseconds|
| store.db.globalTable | db mode global transaction table name | default global_ table |
| store.db.branchTable | db mode branch transaction table name | default branch_ table |
| store.db.LockTable | db mode global lock table name | default lock_ table |
| store.db.queryLimit | the maximum number of global transactions queried in db mode at one time | 100 by default|
| store.db.distributedLockTable | db mode Sever side transaction management global lock storage table name | default distributed_ Lock. Under multiple server clusters, only one server is guaranteed to handle the submission or rollback at the same time | New in 1.5.1|
| store.redis.mode | redis mode | default single, optional sentinel | New sentinel mode in 1.4.2|
| store.redis.single.host | The Redis host in stand-alone mode is compatible with versions earlier than 1.4.2. If this configuration is empty, select store.redis Host as a configuration item | New in 1.4.2|
| store.redis.single.port | The port of Redis in stand-alone mode is compatible with versions earlier than 1.4.2. If this configuration is empty, select store.redis Port as a configuration item | New in 1.4.2|
| store.redis.sentinel.masterName | Redis master database name in sentinel mode | | New in 1.4.2|
| store.redis.sentinel.sentinelHosts | sentinel hosts in sentinel mode | Multiple hosts are separated by commas | New in 1.4.2|
| store.redis.host | redis mode IP | Default 127.0.0.1 | Version 1.4.2 deprecated|
| store.redis.port | redis mode port | 6379 by default | Version 1.4.2 is deprecated|
| store.redis.maxConn | maximum connections in Redis mode | 10 by default|
| store.redis.minConn | minimum connections in Redis mode | 1 by default|
| store.redis.database | redis mode default library | default 0|
| store.redis.password | redis mode password (optional) | null by default|
| store.redis.queryLimit | The maximum number of Redis queries at a time | 100 by default|
| metrics.enabled | Whether to enable Metrics | False is off by default. In the false state, all Metrics related components will not be initialized to minimize the performance loss|
| metrics.registryType | Indicator registrar type | The indicator registrar type used by Metrics is a built-in compact (simple) implementation by default. Meters in this implementation only use a limited memory count, and the performance is high enough to meet most scenarios; Currently, only one indicator registrar can be set|
| metrics.exporterList | Index result Measurement data outputter list | default prometheus. Multiple outputters are separated by English commas, such as "prometheus, jmx". Currently, only the prometheus outputters are connected|
| metrics.exporterPrometheusPort | prometheus exporter client port number | 9898 by default|
###Client side
| key| desc | remark| change record |
|-------------------------------------------|----------------------------|----------------------------|----------------|
| seata.enabled | whether to enable spring boot automatic assembly | true, false, (SSBS) special configuration, default true (Appendix 4)|
| seata.enableAutoDataSourceProxy=true | whether to enable automatic proxy of data source | True, false, data spring boot starter (SSBS) is a special configuration. SSBS will enable automatic proxy of data source by default and can be closed through this configuration item|
| seata.useJdkProxy=false | whether to use JDK proxy as the implementation method of data source automatic proxy | true, false, (SSBS) proprietary configuration, false by default, CGLIB as the implementation method of data source automatic proxy|
| transport.enableClientBatchSendRequest | whether to batch merge and send client transaction message requests | The default is true and false|
| client.log.exceptionRate | log exception output probability | 100 by default, currently used for exception stack output in case of undo rollback failure, 1% probability output, rollback failure is basically dirty data, no need to output stack to occupy hard disk space|
| service.vgroupMapping.my_test_tx_Group | transaction group (Appendix 1) | my_ test_ tx_ Group refers to grouping, and the configuration item value is TC cluster name|
| service.default.grouplist | TC service list (Appendix 2) | Only used when the registry is file|
| service.disableGlobalTransaction | global transaction switch | False by default. false is on, true is off|
| client.tm.downgradeCheck | demote switch | False by default. The business side automatically downgrades the seata transaction based on the number of consecutive errors (see Appendix 6 for details)|
| client.tm.gradeCheckAllowTimes | threshold value for reaching the standard of promotion and demotion | 10 by default|
| client.tm.downgradeCheckPeriod | service self check cycle | 2000 by default, in ms Conduct a service self check every 2 seconds to decide|
| client.rm.reportSuccessEnable | whether to report phase I success | True, false, starting from version 1.1.0. The default is false true is used to keep the life cycle records of branch transactions complete. false can improve performance|
| client.rm.asyncCommitBufferLimit | asynchronous commit cache queue length | 10000 by default. Phase II commit succeeded. RM asynchronously cleans the undo queue|
| client.rm.lock.retryInterval | retry interval for verifying or occupying the global lock | 10 by default, in milliseconds|
| client.rm.lock.retryTimes | number of retries to verify or occupy the global lock | 30 by default|
| client.rm.lock.retryPolicyBranchRollbackOnConflict | the lock policy when a branch transaction conflicts with other global rollback transactions | The default is true. Release the local lock first to allow rollback to succeed|
| client.rm.reportRetryCount | the number of TC retries for reporting the results in the first phase | 5 by default | New in 1.4.1|
| client.rm.tableMetaCheckEnable | automatically refresh the table structure in the cache | Default false | New in 1.5.1|
| client.rm.tableMetaCheckerInterval | interval between scheduled refreshing of table structures in cache | 60 seconds by default|
| client.rm.sagaBranchRegisterEnable | whether to enable saga branch registration | In Saga mode, the branch state is stored in the local database of the state machine and can be submitted or rolled back through the state machine. To improve performance, you can consider not registering Saga branches with the TC, but you need to consider the availability of the state machine. The default is false|
| client.rm.sagaJsonParser | data serialization method in saga mode | Fastjson by default, jackson by choice | New in 1.5.1|
| client.rm.tccActionInterceptorOrder | tcc interceptor order | default Ordered HIGHEST_ PRECEDENCE+1000 ensures that the interceptor is executed before the local transaction interceptor. You can also customize the execution order of the interceptor for tcc and business development | New in 1.5.1|
| client.tm.commitRetryCount | the number of TC retries for reporting the results of the first phase global submission | 1 by default, it is recommended to be greater than 1|
| client.tm.rollbackRetryCount | the number of TC retries reported for the global rollback results in the first phase | 1 by default, it is recommended to be greater than 1|
| client.tm.defaultGlobalTransactionTimeout | global transaction timeout | The default is 60 seconds. After TM detects a branch transaction timeout or TC detects that TM has not made a two-phase report timeout, it initiates a rollback of the branch transaction | New in 1.4.0|
| client.tm.interceptorOrder | TM global transaction interceptor order | Ordered by default HIGHEST_ PRECEDENCE+1000 ensures that the interceptor is executed before the local transaction interceptor. You can also customize the execution order of the interceptor for global transactions and business development | New in 1.5.1|
| client.undo.dataValidation | Phase2 rollback image verification | By default, true is enabled and false is disabled|
| client.undo.logSerialization | undo serialization method | default jackson|
| client.undo.logTable | user defined undo table name | Default undo_ log |
| client.undo.onlyCareUpdateColumns | only images of updated columns are generated | Default true|
| client.undo.compress.enable | undo log compression switch | default true | New in 1.4.1|
| client.undo.compress.type | undo log compression algorithm | Default zip. Options include NONE, GZIP, ZIP, SEVENZ, BZIP2, LZ4, DEFLATER, and ZSTD | New in 1.4.1|
| client.undo.compress.threshold | undo log compression threshold | The default value is 64k. Compression occurs when the compression switch is on and the undo log size exceeds the threshold value | New in 1.4.1|
| client.rm.sqlParserType | sql resolution type | default druid, optional antlr|
<details>
<summary><mark>synchronize parameters to the configuration center for use demo</mark></summary>
#### Nacos
shell:
```bash
sh ${SEATAPATH}/script/config-center/nacos/nacos-config.sh -h localhost -p 8848 -g SEATA_GROUP -t 5a3c7d6c-f497-4d68-a71a-2e5e3340b3ca
```
Parameter description:
-h: Host, the default is localhost
-p: Port, default 8848
-g: Configure grouping. The default value is' SEATA_ GROUP'
-t: Tenant information, corresponding to the namespace ID field of Nacos, the default value is null ''
#### Apollo
```bash
sh ${SEATAPATH}/script/config-center/apollo/apollo-config.sh -h localhost -p 8070 -e DEV -a seata-server -c default -n application -d apollo -r apollo -t 3aa026fc8435d0fc4505b345b8fa4578fb646a2c
```
Parameter description:
-h: Host, the default is localhost
-p: Port, the default value is 8070
-e: Managed configuration environment, default value DEV
-a: AppId of the Namespace. The default value is seata server
-c: The name of the managed configuration cluster is generally passed in as default. If it is a special cluster, just pass in the name of the corresponding cluster. The default value is default
-n: The name of the namespace under management. If it is not in the properties format, it needs to add a suffix, such as sample.yml. The default value is application
-d: The creator of the item, in the format of domain account, that is, the user ID of the sso system
-r: Publisher, domain account. Note: If the namespace. lock. switch in Apollo ConfigDB. ServerConfig is set to true (false by default), the environment does not allow the publisher and editor to be the same person. So if the editor is zhangsan, the publisher can no longer be zhangsan.
-t: The Apollo administrator creates a third-party application at http://{portal_address}/open/manage.html. Before creating it, it is better to query whether the AppId has been created. After successful creation, a token will be generated
For details of the above parameters, see:
https://github.com/ctripcorp/apollo/wiki/Apollo%E5%BC%80%E6%94%BE%E5%B9%B3%E5%8F%B0
#### Consul
```bash
sh ${SEATAPATH}/script/config-center/consul/consul-config.sh -h localhost -p 8500
```
Parameter description:
-h: host, the default is localhost
-p: port, the default value is 8500
#### Etcd3
```bash
sh ${SEATAPATH}/script/config-center/etcd3/etcd3-config.sh -h localhost -p 2379
```
Parameter description:
-h: Host, the default is localhost
-p: Port, the default value is 2379
python:
```bash
python ${SEATAPATH}/script/config-center/nacos/nacos-config.py localhost:8848
```
#### ZK
```bash
sh ${SEATAPATH}/script/config-center/zk/zk-config.sh -h localhost -p 2181 -z "/Users/zhangchenghui/zookeeper-3.4.14"
```
Parameter description:
-h: host, the default is localhost
-p: port, the default value is 2181
-z: zk path
</details>
###Appendix 1:
Description of transaction grouping.
1. What is a transaction group?
Transaction grouping is the resource logic of seata, similar to service instance. My in file.conf_ test_ tx_ A group is a transaction group.
2. How to find the back-end cluster through transaction grouping?
First, the program configures transaction grouping (txServiceGroup parameter of GlobalTransactionScanner construction method). The program will search for service.vgroupMapping through the user configured configuration center
Transaction grouping configuration item. The value of the configuration item obtained is the name of the TC cluster. The program that obtains the cluster name constructs the service name through a certain prefix+cluster name. The service name of each configuration center is different. Get the service name, go to the corresponding registry, pull the service list of the corresponding service name, and get the real TC service list of the back-end.
3. Why is the design so that the service name is not directly taken?
There is an additional layer to obtain the configuration of transaction groups to the mapping cluster. After this design, the transaction group can be used as the logical isolation unit of resources, which can quickly fail over when a failure occurs.
###Appendix 2:
About the grouplist question.
1. When will the default.grouplist in file.conf be used?
It is used when registry. type=file. It is not read in other times.
2. Can multiple value lists be configured for default.grouplist?
Multiple can be configured, which means cluster, but when store When mode=file, an error will be reported. The reason is that the file storage mode does not provide synchronization of local files, so you need to use store. mode=db to share data between TC clusters through db
3. Is default.grouplist recommended?
Not recommended. For example, question 1, when registering It is used when type=file, which means that the real registry is not used here, and the health check mechanism without specific services cannot automatically remove the list when the tc is unavailable. It is recommended to use nacos, eureka, redis, zk, consumer, etcd3, and sofa. Registry. type=file or config The original purpose of type=file design is to enable users to quickly verify the seata service through direct connection without relying on a third-party registry or configuration center.
4. Why is the configuration in seata spring boot starter grouplist.default, that is, the default in file.conf Is the writing of grouplist just reversed?
Due to the syntax requirements of the spring boot configuration file itself, the default.grouplist in file.conf needs to be written as grouplist.default in this place. The effect is the same
###Appendix 3:
log_ Status=1 is defensive. It is a global rollback request received, but it is uncertain whether the local transaction of a transaction branch has been executed. At this time, a piece of data with the same branch ID is inserted in advance, and the inserted false data is successful. If the local transaction continues to execute, the only index conflict will be reported for automatic rollback.
If the insertion is unsuccessful, it indicates that the local transaction has been completed, and the undo data is taken out for reverse rollback.
###Appendix 4:
Whether to enable spring boot automatic assembly. If it is enabled, the integration of seata and spring boot will be automatically configured, including the automatic proxy of data source and initialization of GlobalTransactionScanner.
Note: New features of version 1.0 need to rely on seata spring boot starter.
###Appendix 5:
The following annotations have been added to seata 1.1.0 to enable the automatic proxy function of data sources
@EnableAutoDataSourceProxy
| attribute| desc | remark|
|-------------------------------------------|----------------------------|----------------------------|
|UseJdkProxy | Whether to use JDK proxy as the implementation method of data source automatic proxy | false, true, false by default, CGLIB as the implementation method of data source automatic proxy|
1. For the method of using seata spring boot starter, the data source automatic proxy is enabled by default. If you need to close it, please configure seata. enableAutoDataSourceProxy=false, which is true by default.
To switch the proxy implementation mode, please click seata UseJdkProxy=false. The default value is false. CGLIB is used as the implementation method of automatic proxy for data sources.
2. For the method of using seata all, please use @ EnableAutoDataSourceProxy to explicitly enable the automatic proxy function of the data source. If necessary, you can use the useJdkProxy attribute of the annotation to implement the proxy
Switch of. The default value is false. CGLIB is used as the implementation method of automatic proxy for data sources.
###Appendix 6:
```
Introduction to the implementation of automatic service degradation policy:
First, decide whether to start the self-test thread by reading whether client.tm.degradeCheck is true. Then read degradeCheckAllowTimes and degradeCheckPeriod to confirm the threshold value and self-test cycle
Assume that degradeCheckAllowTimes=10, and degradeCheckPeriod=2000
Then a start and commit test will be performed every 2 seconds. If it fails, the number of consecutive failures will be recorded. If it succeeds, the number of consecutive failures will be cleared The continuous errors are accumulated by the user interface and the self checking thread until the number of continuous failures reaches the user's threshold, then the Seata distributed transaction is closed to avoid the user's own business being unavailable for a long time
On the contrary, if the current distributed transaction is closed, the self-test thread will continue to perform the self-test every 2 seconds until the number of consecutive successes reaches the threshold set by the user, then the Seata distributed transaction will be restored to use
```
###Appendix 7:
In the store mode=db. Because seata inserts global locks in batches through the executeBatch of jdbc, according to the MySQL official website, when the rewriteBatchedStatements in the connection parameter is true, when executeBatch is executed and the operation type is insert, the jdbc driver will optimize the corresponding SQL to the form of 'insert into () values (), ()' to improve the performance of batch insert.
According to the actual test, when this parameter is set to true, the corresponding batch insert performance is more than 10 times of the original. Therefore, it is recommended to set this parameter to true when the data source is MySQL.

View File

@ -0,0 +1,188 @@
---
Title: Seata parameter configuration version 0.9.0
keywords: Seata
Description: The seata parameter configuration version is 0.9.0.
---
#Seata parameter configuration version 0.9.0
###Public sector
| key | desc | remark|
|---------------|--------------|----|
|transport.serialization | client and server communication codec method | seata, protobuf|
|transport.heartbeat | the heartbeat detection switch for client server communication | The default value is true|
|registry.type | registry type | Default file, which supports file, nacos, redis, eureka, zk, consumer, etcd3, sofa, and custom | Version 1.6.0 Server supports simultaneous registration to multiple registries, separated by commas|
|config.type | configuration center type | default file, supporting file, nacos, apollo, zk, consult, etcd3, springcloud, custom|
###Server side
| key | desc | remark|
|---------------|--------------|----|
| transaction.undo.log.save.days | undo retention days | 7 days by default, log_ Status=1 (Appendix 3) and undo not normally cleaned|
| transaction.undo.log.delete.period | undo Cleanup thread interval | 86400000 by default, in milliseconds|
| service.max.commit.retry.timeout | timeout duration of two-phase commit retry | Unit: ms, s, m, h, d, corresponding to ms, s, min, h, d, and the default is ms. The default value of - 1 means unlimited retries. Formula: timeout>=now globalTransactionBeginTime, true means no retry if timeout occurs|
| service.max.rollback.retry.timeout | timeout duration of two-phase rollback retry | Same as commit|
| recovery.committing-retry-period | Phase2 commit unfinished status Global transaction retry commit thread interval | 1000 by default, in milliseconds|
| recovery.async-committing-retry-period | Phase2 asynchronous submission status Retry submission thread interval | 1000 by default, in milliseconds|
| recovery.rollback-retry-period | Phase2 rollback status Retry rollback thread interval | 1000 by default, in milliseconds|
| recovery.timeout-retry-period | Timeout status detection Retry thread interval | 1000 by default, in milliseconds. If timeout is detected, put the global transaction into the rollback session manager|
| store.mode | Transaction session information storage mode | file Local file (HA is not supported), db database (HA is supported)|
| store.file.dir | file mode file storage folder name | default sessionStore|
| store.file.maxBranchSessionSize | file mode file storage branch session maximum bytes | 16384 (16kb) by default, in bytes|
| store.file.maxGlobalSessionSize | file mode file stores the maximum number of global session bytes | 512b by default, in bytes|
| store.file.fileWriteBufferCacheSize | file mode file storage buffer maximum cache size | 16384 (16kb) by default, in bytes. When the amount of data such as session written is greater than this value, an exception will be thrown|
| store.file.flushDiskMode | file mode file storage flushing policy | default async, optional sync|
| store.file.sessionReloadReadSize | file mode File storage The maximum number of session or lock keys recovered from the backup file after the server node restarts | 100 by default|
| store.db.datasource | db mode data source type | default dbcp|
| store.db.db type | db mode database type | default mysql|
| store.db.driver class name | db mode database driver | default com.mysql.jdbc Driver |
| store.db.url | db mode data source library url | default jdbc: mysql://127.0.0.1:3306/seata |
| store.db.user | db mode database account | default MySQL|
| store.db.min-conn | the number of initial connections to the database in db mode | 1 by default|
| store.db.max-conn | Maximum number of database connections in db mode | 3 by default|
| store.db.global.table | db mode global transaction table name | default global_ table |
| store.db.branch.table | db mode branch transaction table name | default branch_ table |
| store.db.lock table | db mode global lock table name | default lock_ table |
| store.db.query-limit | the maximum number of global transactions queried in db mode | 1000 by default|
| metrics.enabled | whether to enable Metrics | False is off by default. In the false state, all Metrics related components will not be initialized to minimize the performance loss|
| metrics.registry-type | indicator registrar type | The indicator registrar type used by Metrics is a built-in compact (simple) implementation by default. Meters in this implementation only use limited memory counts, and the performance is high enough to meet most scenarios; Currently, only one indicator registrar can be set|
| metrics.exporter list | indicator result Measurement data outputter list | default prometheus. Multiple outputters are separated by English commas, such as "prometheus, jmx". Currently, only the prometheus outputters are connected|
| metrics.exporter-prometheus-port | prometheus exporter client port number | 9898 by default|
###Client side
| key | role | desc | remark|
|----------|--------|--------------|----|
| service.vgroup_mapping.my_test_tx_group | TM, RM | Transaction group (Appendix 1) | my_ test_ tx_ Group refers to grouping, and the configuration item value is TC cluster name|
| service.default.grouplist | TM, RM | TC service list (Appendix 2) | Only used when the registry is file|
| service.disableGlobalTransaction | TM, RM | Global Transaction Switch | False by default. false is on, true is off|
| service.enableDegradation | TM | Degradation switch (to be implemented) | False by default. The business side automatically downgrades according to the number of consecutive errors and does not go through the seata transaction|
| client.async.commit.buffer.limit | RM | Asynchronous commit cache queue length | 10000 by default. Phase II commit succeeded. RM asynchronously cleans the undo queue|
| client.lock.retry.internal | RM | Check or occupy the global lock retry interval | 10 by default, in milliseconds|
| client.lock.retry.times | RM | Number of retries to verify or occupy the global lock | 30 by default|
| client.lock.retry.policy.branch-rollback-on-conflict | RM | The lock policy when a branch transaction conflicts with other global rollback transactions | The default is true. The local lock is released first to allow rollback to succeed|
| client.report.retry.count | TM, RM | Number of TC retries for reporting the results of the first phase | 5 by default|
| client.tm.commit.retry.count | TM | The number of TC retries for reporting the results of the first phase global submission | 1 by default, it is recommended to be greater than 1|
| client.tm.rollback.retry.count | TM | The number of TC retries reported in the first phase global rollback results | 1 by default, and it is recommended to be greater than 1|
| client.table.meta.check.enable | RM | Automatically refresh the table structure in the cache | Default true|
| transaction.undo.data.validation | RM | Phase II rollback image verification | True is enabled by default, false is disabled|
| transaction.undo.log.serialization | RM | undo serialization method | default jackson|
| transaction.undo.log.table | RM | User defined undo table name | Default undo_ log |
| support.spring.datasource.autoproxy | RM | Data source auto proxy switch | False is off by default|
### Not in used
| key | desc | remark|
|---------------|--------------|----|
| lock.mode | lock store mode |local、remote |
| lock.local | | |
| lock.remote | | |
###Appendix 1:
Description of transaction grouping.
1. What is a transaction group?
Transaction grouping is the resource logic of seata, similar to service instance. My in file.conf_ test_ tx_ A group is a transaction group.
2. How to find the back-end cluster through transaction grouping?
First, the program configures transaction grouping (txServiceGroup parameter of GlobalTransactionScanner construction method), and the program will search for service.vgroup through the user configured configuration center_ mapping. Transaction grouping configuration item. The value of the configuration item obtained is the name of the TC cluster. The program that obtains the cluster name constructs the service name through a certain prefix+cluster name. The service name of each configuration center is different. Get the service name, go to the corresponding registry, pull the service list of the corresponding service name, and get the real TC service list of the back-end.
3. Why is the design so that the service name is not directly taken?
There is an additional layer to obtain the configuration of transaction groups to the mapping cluster. After this design, the transaction group can be used as the logical isolation unit of resources, which can quickly fail over when a failure occurs.
###Appendix 2:
About the grouplist question.
1. When will the default.grouplist in file.conf be used?
It is used when registry. type=file. It is not read in other times.
2. Can multiple value lists be configured for default.grouplist?
Multiple can be configured, which means cluster, but when store When mode=file, an error will be reported. The reason is that the file storage mode does not provide synchronization of local files, so you need to use store. mode=db to share data between TC clusters through db
3. Is default.grouplist recommended?
Not recommended. For example, question 1, when registering It is used when type=file, which means that the real registry is not used here, and the health check mechanism without specific services cannot automatically remove the list when the tc is unavailable. It is recommended to use nacos, eureka, redis, zk, consumer, etcd3, and sofa. Registry. type=file or config The original purpose of type=file design is to enable users to quickly verify the seata service through direct connection without relying on a third-party registry or configuration center.
###Appendix 3:
log_ Status=1 is defensive. It means that a global rollback request is received, but it is uncertain whether the local transaction of a transaction branch has been executed. At this time, a piece of data with the same branch ID is inserted in advance, and the inserted false data is successful. If the local transaction continues to execute, the master key conflict will be automatically rolled back.
If the insertion is unsuccessful, it indicates that the local transaction has been completed, and the undo data is taken out for reverse rollback.

View File

@ -0,0 +1,284 @@
---
Title: Seata parameter configuration
keywords: Seata
Description: Seata parameter configuration.
---
#The seata parameter configuration version 1.0.0
<a href="./configurations090. html">View versions before 0.9.0.1</a>
###Change record
```
20191221: Added seata. enabled, client. report. success. enable
transport.enable-client-batch-send-request、client.log.exceptionRate
```
##Attention attribute (see all attributes for detailed description)
| server side | client side|
|---------------|----|
| registry.type |registry.type|
| config.type |config.type|
| store.mode |service.vgroup_mapping.my_test_tx_group|
| store.db.driver-class-name | service.default.grouplist |
| store.db.url |service.disableGlobalTransaction |
| store.db.user | client.support.spring.datasource.autoproxy|
| store.db.password | |
##All attributes
###Public sector
| key | desc | remark|
|---------------|--------------|----|
| transport.serialization | client and server communication codec method | seata (ByteBuf), protobuf, kryo, mission, default seata|
| transport.compressor | compression method of communication data between client and server | none, gzip, default: none|
| transport.heartbeat | the heartbeat detection switch for communication between client and server | True is enabled by default|
| registry.type | registry type | default file, supporting file, nacos, eureka, redis, zk, consumer, etcd3, sofa, and custom|
| config.type | configuration center type | Default file, supporting file, nacos, apollo, zk, consult, etcd3, and custom|
###Server side
| key| desc | remark|
|-------------------------------------------|---------------------------------|----------------------------|
| server.undo.log.save.days | undo retention days | 7 days by default, log_ Status=1 (Appendix 3) and undo not normally cleaned|
| server.undo.log.delete.period | undo Cleanup thread interval | 86400000 by default, in milliseconds|
| server.max.commit.retry.timeout | Timeout duration of two-phase commit retry | Unit: ms, s, m, h, d, corresponding to ms, s, min, h, d, and the default is ms. The default value of - 1 means unlimited retries. Formula: timeout>=now globalTransactionBeginTime, true means no retry if timeout occurs|
| server.max.rollback.retry.timeout | Timeout duration of two-phase rollback retry | Same as commit|
| server.recovery.committing-retry-period | Phase2 commit unfinished status Global transaction retry commit thread interval | 1000 by default, in milliseconds|
| server.recovery.async-committing-retry-period | Phase2 asynchronous submission status Retry submission thread interval | 1000 by default, in milliseconds|
| server.recovery.rollback-retry-period | Phase2 rollback status retry rollbacking thread interval | 1000 by default, in milliseconds|
| server.recovery.timeout-retry-period | Timeout status detection Retry thread interval | 1000 by default, in milliseconds. If timeout is detected, put the global transaction into the rollback session manager|
| store.mode | Transaction session information storage mode | file Local file (HA is not supported), db database (HA is supported)|
| store.file.dir | file mode file storage folder name | default sessionStore|
| store.db.datasource | db mode data source type | default dbcp|
| store.db.db-type | db mode database type | default mysql|
| store.db.driver-class-name | db mode database driver | default com.mysql.jdbc Driver |
| store.db.url | db mode database url | default jdbc: mysql://127.0.0.1:3306/seata |
| store.db.user | db mode database account | default MySQL|
| store.db.password | db mode database account password | default MySQL|
| store.db.min-conn | The number of initial connections to the database in db mode | 1 by default|
| store.db.max-conn | maximum number of connections to database in db mode | 3 by default|
| store.db.global.table | db mode global transaction table name | default global_ table |
| store.db.branch.table | db mode branch transaction table name | default branch_ table |
| store.db.lock-table | db mode global lock table name | default lock_ table |
| store.db.query-limit | The maximum number of global transactions queried in db mode | 100 by default|
| metrics.enabled | whether to enable Metrics | False is off by default. In the false state, all Metrics related components will not be initialized to minimize the performance loss|
| metrics.registry-type | indicator registrar type | The indicator registrar type used by Metrics is a built-in compact (simple) implementation by default. Meters in this implementation only use limited memory counts, and the performance is high enough to meet most scenarios; Currently, only one indicator registrar can be set|
| metrics.exporter-list | indicator result Measurement data outputter list | default prometheus. Multiple outputters are separated by English commas, such as "prometheus, jmx". Currently, only the prometheus outputters are connected|
| metrics.exporter-prometheus-port | prometheus exporter client port number | 9898 by default|
### client端
| key| desc | remark|
|-------------------------------------------|----------------------------|----------------------------|
| seata.enabled | whether to enable spring boot automatic assembly |true、falsedefault trueappendix 4 |
| client.report.success.enable |whether to report success in the first phase | true, false, default true is used to keep the branch transaction lifecycle records complete, false can improve performance|
| transport.enable-client-batch-send-request
| client.log.exceptionRate |whether to batch merge and send the client transaction message requests | The default is true and false|
| service.vgroup_mapping.my_test_tx_group
| service.default.grouplist |log exception output probability | 100 by default, currently used for exception stack output when undo rollback fails, 1% probability output, rollback failure is basically dirty data, and the output stack does not need to occupy hard disk space|
| service.disableGlobalTransaction
| service.enableDegrade |transaction Group (Appendix 1) | my_ test_ tx_ Group refers to grouping, and the configuration item value is TC cluster name|
| client.rm.async.commit.buffer.limit
| client.rm.lock.retry.internal |TC Service List (Appendix 2) | Only used when the registry is file|
| client.rm.lock.retry.times
| client.rm.lock.retry.policy.branch-rollback-on-co|global transaction switch | False by default. false is on, true is off|
| client.rm.report.retry.count
| client.rm.table.meta.check.enable |degradation switch (to be implemented) | False by default. The business side automatically downgrades according to the number of consecutive errors and does not go through the seata transaction|
| client.tm.commit.retry.count
| client.tm.rollback.retry.count |asynchronous commit cache queue length | 10000 by default. Phase II commit succeeded. RM asynchronously cleans the undo queue|
| client.undo.data.validation
| client.undo.log.serialization |check or occupy the global lock retry interval | 10 by default, in milliseconds|
| client.undo.log.table
| client.support.spring.datasource.autoproxy |number of retries to verify or occupy the global lock | 30 by default|
### Not in used
| key | desc | remark|
|---------------|--------------|----|
| lock.mode | 锁存储方式 |local、remote |
| lock.local | | |
| lock.remote | | |
### synchronize parameters to the configuration center for use demo
#### Nacos
shell:
```bash
sh ${SEATAPATH}/script/config-center/nacos/nacos-config.sh -h localhost -p 8848 -g SEATA_GROUP -t 5a3c7d6c-f497-4d68-a71a-2e5e3340b3ca
```
Parameter description:
-h: Host, the default is localhost
-p: Port, default 8848
-g: Configure grouping. The default value is' SEATA_ GROUP'
-t: Tenant information, corresponding to the namespace ID field of Nacos, the default value is null ''
#### Apollo
```bash
sh ${SEATAPATH}/script/config-center/apollo/apollo-config.sh -h localhost -p 8070 -e DEV -a seata-server -c default -n application -d apollo -r apollo -t 3aa026fc8435d0fc4505b345b8fa4578fb646a2c
```
Parameter description:
-h: Host, the default is localhost
-p: Port, the default value is 8070
-e: Managed configuration environment, default value DEV
-a: AppId of the Namespace. The default value is seata server
-c: The name of the managed configuration cluster is generally passed in as default. If it is a special cluster, just pass in the name of the corresponding cluster. The default value is default
-n: The name of the namespace under management, if it is not in the properties format, needs to add a suffix, such as sample Yml, default value application
-d: The creator of the item, in the format of domain account, that is, the user ID of the sso system
-r: Publisher, domain account, note: if Apollo ConfigDB namespace.lock in ServerConfig If the switch is set to true (false by default), the environment does not allow the publisher and editor to be the same person. So if the editor is zhangsan, the publisher can no longer be zhangsan.
-t: The Apollo administrator can click http://{portal_address}/open/manage Html To create a third-party application, you'd better first query whether this AppId has been created. After successful creation, a token will be generated
For details of the above parameters, see:
https://github.com/ctripcorp/apollo/wiki/Apollo%E5%BC%80%E6%94%BE%E5%B9%B3%E5%8F%B0
#### Consul
```bash
sh ${SEATAPATH}/script/config-center/consul/consul-config.sh -h localhost -p 8500
```
Parameter description:
-h: host, the default is localhost
-p: port, the default value is 8500
#### Etcd3
```bash
sh ${SEATAPATH}/script/config-center/etcd3/etcd3-config.sh -h localhost -p 2379
```
Parameter description:
-h: Host, the default is localhost
-p: Port, the default value is 2379
python:
```bash
python ${SEATAPATH}/script/config-center/nacos/nacos-config.py localhost:8848
```
#### ZK
```bash
sh ${SEATAPATH}/script/config-center/zk/zk-config.sh -h localhost -p 2181 -z "/Users/zhangchenghui/zookeeper-3.4.14"
```
Parameter description:
-h: Host, the default is localhost
-p: Port, the default value is 2181
-z: zk path
###Appendix 1:
Description of transaction grouping.
1. What is a transaction group?
Transaction grouping is the resource logic of seata, similar to service instance. My in file.conf_ test_ tx_ A group is a transaction group.
2. How to find the back-end cluster through transaction grouping?
First, the program configures transaction grouping (txServiceGroup parameter of GlobalTransactionScanner construction method), and the program will search for service.vgroup through the user configured configuration center_ mapping. Transaction grouping configuration item. The value of the configuration item obtained is the name of the TC cluster. The program that obtains the cluster name constructs the service name through a certain prefix+cluster name. The service name of each configuration center is different. Get the service name, go to the corresponding registry, pull the service list of the corresponding service name, and get the real TC service list of the back-end.
3. Why is the design so that the service name is not directly taken?
There is an additional layer to obtain the configuration of transaction groups to the mapping cluster. After this design, the transaction group can be used as the logical isolation unit of resources, which can quickly fail over when a failure occurs.
###Appendix 2:
About the grouplist question.
1. When will the default.grouplist in file.conf be used?
It is used when registry. type=file. It is not read in other times.
2. Can multiple value lists be configured for default.grouplist?
Multiple can be configured, which means cluster, but when store When mode=file, an error will be reported. The reason is that the file storage mode does not provide synchronization of local files, so you need to use store. mode=db to share data between TC clusters through db
3. Is default.grouplist recommended?
Not recommended. For example, question 1, when registering It is used when type=file, which means that the real registry is not used here, and the health check mechanism without specific services cannot automatically remove the list when the tc is unavailable. It is recommended to use nacos, eureka, redis, zk, consumer, etcd3, and sofa. Registry. type=file or config The original purpose of type=file design is to enable users to quickly verify the seata service through direct connection without relying on a third-party registry or configuration center.
###Appendix 3:
log_ Status=1 is defensive. It means that a global rollback request is received, but it is uncertain whether the local transaction of a transaction branch has been executed. At this time, a piece of data with the same branch ID is inserted in advance, and the inserted false data is successful. If the local transaction continues to execute, the master key conflict will be automatically rolled back.
If the insertion is unsuccessful, it indicates that the local transaction has been completed, and the undo data is taken out for reverse rollback.
###Appendix 4:
Whether to enable spring boot automatic assembly. If it is enabled, the integration of seata and spring boot will be automatically configured, including the automatic proxy of data source and initialization of GlobalTransactionScanner.
Note: New features of version 1.0 need to rely on seata spring boot starter.

View File

@ -0,0 +1,19 @@
---
title: DML
keywords: Seata
description: Seata DML
---
# DML
This article introduces the types of DML statements, SQL instances, and whether Seata supports them, helping you to use SQL more smoothly in Seata.
| Type&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |SQL Examples| Support&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |
| :------- | :----------------------------------------------------------- | :------- |
| INSERT | `INSERT INTO tb1_name (col_name,...) VALUES ({expr \| FAULT},...),(...),...` or `INSERT INTO tb1_name SET col_name={expr \| DEFAULT}, ...` or `INSERT INTO tb1_name (col_name,...) VALUES ({expr \| FAULT},...) ON DUPLICATE KEY UPDATE field1=value1,...;` | Yes |
| UPDATE | `UPDATE tb1_name SET col_name1=expr1 [, col_name2=expr2 ...][WHERE where_definition]` | Yes |
| DELETE | `DELETE FROM tb1_name [WHERE where_definition]` | Yes |
| SELECT | `SELECT [ALL \| DISTINCT \| DISTINCTROW ]select_expr, ... FROM tb1_name[WHERE where_definition]` | Yes |
| REPLACE | `REPLACE [LOW_PRIORITY \| DELAYED][INTO] tb1_name [(col_name,...)]VALUES ({expr \| DEFAULT},...),(...),...` or `REPLACE [LOW_PRIORITY \| DELAYED][INTO] tb1_nameSET col_name={expr \| DEFAULT}, ...` | No |
| TRUNCATE | `TRUNCATE [TABLE] tb1_name` | No |
| UPDATE JOIN | `UPDATE tb1_name tb1 JOIN tb2_name tb2 ON tb2.col_name=tb1.col_name SET tb1.col_name1=expr1 [, tb1.col_name2=expr2 ...][ [WHERE where_definition]` | Yes,since 1.6.0 |

View File

@ -0,0 +1,32 @@
---
title: SQL restrictions
keywords: Seata
description: Seata SQL restrictions
---
# SQL Restrictions
Seata transactions currently support some functions of the DML syntax of INSERT, UPDATE, and DELETE. These types have been verified by the Seata open source community. The scope of SQL support is still expanding, and it is recommended to use it within the limits of this article. If you are interested in helping the community support more types of SQL, please submit a PR.
### Usage restrictions
- SQL nesting is not supported
- Does not support multi-table complex SQL (Since version 1.6.0, MySQL supports UPDATE JOIN statement, <a href="./dml.md">Please see details</a>)
- Stored procedures and triggers are not supported
- Some databases do not support batch update, but support batch when using MySQL, Mariadb, PostgreSQL9.6+ as the database, the batch update method is as follows, taking Java as an example
```
// use JdbcTemplate
public void batchUpdate() {
jdbcTemplate.batchUpdate(
"update storage_tbl set count = count -1 where id = 1",
"update storage_tbl set count = count -1 where id = 2"
);
}
// use Statement
public void batchUpdateTwo() {
statement.addBatch("update storage_tbl set count = count -1 where id = 1");
statement.addBatch("update storage_tbl set count = count -1 where id = 2");
statement.executeBatch();
}
```

View File

@ -0,0 +1,55 @@
# 领域模型概述
本文为您介绍 Seata(Simpe Extensible Autonomous Transcaction Architecture) 的领域模型。
Seata 是一款针对分布式架构下产生的数据一致性问题而诞生的分布式事务产品使用2pc或基于base理论的最终一致性来达成事务。事务模式的具体说明请参考开发者指南中的事务模式介绍。 Seata 产品具备XA&AT无业务入侵的即插即用模式,TCC不与具体的服务框架耦合,与底层 RPC 协议无关,与底层存储介质无关性的优势,SAGA模式的高度自定义,最终一致性,高性能的优势,针对每个业务场景的不同可有效的基于Seata分布式事务平台,快速高效的建立安全的事务保障。
## Seata 领域模型
![image](https://img.alicdn.com/tfs/TB19qmhOrY1gK0jSZTEXXXDQVXa-1330-924.png)
如上图所示Seata 中事务生命周期主要分为Begin(TM),Registry(RM),Commit/Rollback(TM&TC)这三部分。
事务管理者(TM)通过rpc至事务协调者(TC)创建全局事务(Global Transaction)将TC生成的XID传递至其TM所调用的任意资源管理者(RM)中RM通过其接收到的XID,将其所管理的资源且被该调用锁使用到的资源注册为一个事务分支(Branch Transaction),当该请求的调用链全部结束时TM将事务的决议结果(Commit/Rollback)通知TC,TC将协调所有RM进行事务的二阶段动作.
**事务创建**
事务管理者(TM)
Seata 中用于创建和决议事务结果的实体,一般集成于业务调用链路的上游.
**分支事务**
资源管理者(RM)
Seata 中用于管理资源的实体,一般情况下等同于微服务中的提供方(provider),管理其所在服务中的资源,如数据库资源等.
**事务决议**
事务协调者(TC)
Seata 中用于2pc方式的事务模式统一协调事务的实体(SAGA除外),其可由事务管理者驱动或自身驱动进行事务的二阶段行为.
- Commit
Seata 中当事务管理器决议为提交时,TC才会进行对事务的二阶段提交行为下发,如TCC模式中的confirm,AT模式的undolog delete,XA模式的XA Commit。
- Rollback
Seata 中当事务管理器决议为回滚时,TC会进行对事务的二阶段回滚行为下发,如TCC模式中的cancel,AT模式的undo,XA模式的XA Rollback。
- TimeoutRollback
Seata 中当事务管理器创建事务时指定的Timeout时间到达后还未决议时,TC会主动将已超时的事务进行超时回滚,其超时行为等同上述Rollback行为.
以上为TC涉及事务处理的三种情况,其三种状态会扩展出更多的事务状态,[具体可点击此处查看](https://seata.io/zh-cn/docs/user/appendix/global-transaction-status.html).
**高可用**
[事务分组](https://seata.io/zh-cn/docs/user/txgroup/transaction-group.html)(tx-service-group)
seata的资源逻辑可以按微服务的需要在应用程序客户端对自行定义事务分组每组取一个名字。
[服务发现](https://seata.io/zh-cn/docs/user/registry/index.html)
Seata 中服务发现支持eureka,nacos,consul,etcd,zookeeper,sofa,redis,file(文件指定)

View File

@ -0,0 +1 @@
欢迎认领补充此文档

View File

@ -0,0 +1 @@
欢迎认领补充此文档

View File

@ -0,0 +1 @@
欢迎认领补充此文档

View File

@ -97,7 +97,7 @@ select id, name, since from product where name = 'TXC';
4. 查询后镜像:根据前镜像的结果,通过 **主键** 定位数据。
```sql
select id, name, since from product where id = 1`;
select id, name, since from product where id = 1;
```
得到后镜像:

View File

@ -44,7 +44,7 @@ Metrics核心模块根据配置组织加载1个Registry和N个Exporter
| --------- | ------------------------------------------------------------ |
| Gauge | 单一最新值度量器 |
| Counter | 单一累加度量器,可增可减 |
| Summary | 多Measurement输出计数器将输出`total`(合计)、`count`(计数)、`max`(最大)、`average`(合计/计数)和`tps`(合计/时间间隔),无单位 |
| Summary | 多Measurement输出计数器将输出`total`(合计)、`count`(计数)和`tps`(合计/时间间隔),无单位 |
| Timer | 多Measurement输出计时器将输出`total`(合计)、`count`(计数)、`max`(最大)和`average`(合计/计数),支持微秒为单位累计 |
>说明:
@ -63,11 +63,11 @@ Metrics核心模块根据配置组织加载1个Registry和N个Exporter
```text
## metrics settings
metrics {
enable = true
registry-type = "compact"
enabled = true
registryType = "compact"
# multi exporters use comma divided
exporter-list = "prometheus"
exporter-prometheus-port = 9898
exporterList = "prometheus"
exporterPrometheusPort = 9898
}
```
或者1.5.0+中使用application.yaml
@ -75,11 +75,21 @@ metrics {
seata:
metrics:
enabled: true
registry-type: compact
exporter-list: prometheus
exporter-prometheus-port: 9898
registryType: compact
exporterList: prometheus
exporterPrometheusPort: 9898
```
或者使用第三方配置中心如nacos,apollo等
[请参考此处](https://github.com/seata/seata/tree/develop/script/config-center)将seata metrics配置项上传到对应配置中心,也可打开对应配置中心控制台进行手动添加
```properties
metrics.enabled=true
metrics.registryType=compact
metrics.exporterList=prometheus
metrics.exporterPrometheusPort=9898
```
之后启动TC即可在`http://tc-server-ip:9898/metrics`上获取到Metrics的文本格式数据。

View File

@ -10,7 +10,8 @@ Seata在消除其软件项目中的安全性问题方面采取严格的立场
## 报告漏洞
如果您对Seata的安全性有担心或者发现漏洞或潜在威胁请发送电子邮件至[dev-seata@googlegroups.com](mailto:dev-seata@googlegroups.com)与Seata安全团队联系。在邮件中指定问题或潜在威胁的描述。还敦促您推荐重现和复制问题的方法。Seata社区会在评估和分析调查结果之后与您联系。 请先注意在安全电子邮件中报告安全问题,然后再在公共领域公开该问题。
如果您对Seata的安全性有担心或者发现漏洞或潜在威胁请通过报告至[ASRC(Alibaba Security Response Center)](https://security.alibaba.com/)与Seata安全团队取得联系。在报告中需要您指定问题或潜在威胁的描述。同时推荐您在报告中重现和复制问题的方法。Seata社区会在评估和分析调查结果之后与您联系。
请先注意在[ASRC(Alibaba Security Response Center)](https://security.alibaba.com/)系统中报告安全问题,不要在公开地方讨论该问题。
## 漏洞处理
@ -19,5 +20,5 @@ Seata在消除其软件项目中的安全性问题方面采取严格的立场
* 报告者将漏洞秘密报告给Seata。
* 相应项目的安全团队与报告者私下合作来解决漏洞。
* 制作了包含该修复程序的有关Seata产品的新版本。
* 该漏洞公开宣布。
* 该漏洞公开宣布。

View File

@ -8,36 +8,41 @@ description: Seata 维护者名单
本页面展示了Seata的开发团队。请通过提交PR的方式把自己的信息添加到列表上。注排名不分先后
## Seata Committer 列表
| 姓名 | github | 公司 |
| ------ | --------------- | --------------- |
| 季敏 | [slievrly](https://github.com/slievrly) | Alibabba |
| 申海强 | [sharajava](https://github.com/sharajava) | Alibabba |
| 厉启鹏 | [wlliqipeng](https://github.com/wlliqipeng) | Alibabba |
| 陈连东 | [purple-force](https://github.com/purple-force) | Alibabba |
| 张森 | [zhangthen](https://github.com/zhangthen) | Antfin |
| 章耿 | [ujjboy](https://github.com/ujjboy) | Antfin |
| 雷志远 | [leizhiyuan](https://github.com/leizhiyuan) | Antfin |
| 王清 | [jovany-wang](https://github.com/jovany-wang) | Antfin |
| 吴江坷 | [xingfudeshi](https://github.com/xingfudeshi) | Truthai |
| 李钊 | [CoffeeLatte007](https://github.com/CoffeeLatte007) | YuanFuDao |
| 王欣 | [lovepoem](https://github.com/lovepoem) | WeiDian |
| 袁国尧 | [github-ygy](https://github.com/github-ygy) | Tuya |
| 张旭 | [zhangxu19830126](https://github.com/zhangxu19830126) | InfiniVision |
| 任帅鹏 | [niaoshuai](https://github.com/niaoshuai) | HuanQiuYouLu |
| 许德佑 | [skyesx](https://github.com/skyesx) | WeBank |
| 庄金雷 | [zjinlei](https://github.com/zjinlei) | Helios |
| 张嘉伟 | [l81893521](https://github.com/l81893521) | Perfect Diary |
| 钟正涛 | [jsbxyyx](https://github.com/jsbxyyx) | Shenzhen arts |
| 陈龙 | [long187](https://github.com/long187) | Antfin |
| 郭云嵩 | [ggndnn](https://github.com/ggndnn) | FND |
### Seata Maintainer 列表
| 姓名 | github | 公司 |
| ------ | ------------------------------------------- | ------- |
| 季敏 | [slievrly](https://github.com/slievrly) | Alibaba |
| 陈健斌 | [a364176773](https://github.com/a364176773) | TongDun |
### Seata Committer 列表
| 姓名 | github | 公司 |
|--| --------------- | --------------- |
| 申海强 | [sharajava](https://github.com/sharajava) | Alibaba |
| 刘戎 | [robynron](https://github.com/robynron) | Alibaba |
| 陈连东 | [purple-force](https://github.com/purple-force) | Alibaba |
| 张森 | [zhangthen](https://github.com/zhangthen) | Antfin |
| 章耿 | [ujjboy](https://github.com/ujjboy) | Antfin |
| 雷志远 | [leizhiyuan](https://github.com/leizhiyuan) | Tencent |
| 王清 | [jovany-wang](https://github.com/jovany-wang) | Baidu |
| 吴江坷 | [xingfudeshi](https://github.com/xingfudeshi) | Truthai |
| 李钊 | [CoffeeLatte007](https://github.com/CoffeeLatte007) | YuanFuDao |
| 王欣 | [lovepoem](https://github.com/lovepoem) | JD |
| 袁国尧 | [github-ygy](https://github.com/github-ygy) | NetEase |
| 张旭 | [zhangxu19830126](https://github.com/zhangxu19830126) | InfiniVision |
| 任帅鹏 | [niaoshuai](https://github.com/niaoshuai) | HuanQiuYouLu |
| 许德佑 | [skyesx](https://github.com/skyesx) | Alibaba |
| 庄金雷 | [zjinlei](https://github.com/zjinlei) | Helios |
| 张嘉伟 | [l81893521](https://github.com/l81893521) | DaShenLin |
| 钟正涛 | [jsbxyyx](https://github.com/jsbxyyx) | Shenzhen arts |
| 陈龙 | [long187](https://github.com/long187) | Unknown |
| 郭云嵩 | [ggndnn](https://github.com/ggndnn) | FND |
| 王良 | [wangliang181230](https://github.com/wangliang181230) | HuiKang |
| 曹华栋 | [caohdgege](https://github.com/caohdgege) | BEIKE |
| 曹华栋 | [caohdgege](https://github.com/caohdgege) | - |
| 汪忠祥 | [lightClouds917](https://github.com/lightClouds917) | TongDun |
| 刘晓敏 | [dk-lockdown](https://github.com/dk-lockdown) | 中国系统 |
| 张乘辉 | [objcoding](https://github.com/objcoding) | Ant Group |
| 任良育 | [renliangyu857](https://github.com/objcoding) | 新网银行 |
## Seata开发者角色
@ -65,3 +70,18 @@ Committer是具有Seata仓库写权限的个人包含以下的标准
Contributor是对Seata项目有贡献的个人标准为
* 提交过PR并被合并
## 贡献指引
### 贡献者向导
* [新贡献者向导](./contributor-guide/new-contributor-guide_dev.html)
* [测试覆盖率向导](./contributor-guide/test-coverage-guide_dev.html)
* [如何汇报安全问题](./contributor-guide/reporting-security-issues_dev.html)
* [参与贡献](./guide_dev.html)
### 提交者向导
* [给问题打标签](./committer-guide/label-an-issue-guide_dev.html)
* [网站向导](./committer-guide/website-guide_dev.html)
* [版本发布向导](./committer-guide/release-guide_dev.html)
### 贡献者活动
* [Top Contributor活动](./contributor-activity/top-contributer_dev.html)

View File

@ -0,0 +1,121 @@
---
hidden: true
title: 使用 Docker 部署 Seata Server
keywords: docker,docker-compose,ops
description: 使用 Docker 部署 Seata Server
author: helloworlde
date: 2019-11-25
---
# 使用 Docker 部署 Seata Server
## 注意事项
- 避免直接拉取latest版本镜像latest版本并不一定是released版本为避免不必要的问题请到[docker镜像仓库](https://hub.docker.com/r/seataio/seata-server/tags)确定要拉取的镜像版本。
## 快速开始
#### 启动seata-server实例
```bash
$ docker run --name seata-server -p 8091:8091 seataio/seata-server:1.4.2
```
#### 指定seata-server IP和端口 启动
```bash
$ docker run --name seata-server \
-p 8091:8091 \
-e SEATA_IP=192.168.1.1 \
-e SEATA_PORT=8091 \
seataio/seata-server
```
#### Docker compose 启动
`docker-compose.yaml` 示例
```yaml
version: "3"
services:
seata-server:
image: seataio/seata-server:${latest-release-version}
hostname: seata-server
ports:
- "8091:8091"
environment:
- SEATA_PORT=8091
- STORE_MODE=file
```
## 容器命令行及查看日志
```bash
$ docker exec -it seata-server sh
```
```bash
$ docker logs -f seata-server
```
## 使用自定义配置文件
自定义配置文件需要通过挂载文件的方式实现,将宿主机上的 `registry.conf``file.conf` 挂载到容器中相应的目录
- 指定 registry.conf
使用自定义配置文件时必须指定环境变量 `SEATA_CONFIG_NAME`, 并且值需要以`file:`开始, 如: `file:/root/seata-config/registry`
```bash
$ docker run --name seata-server \
-p 8091:8091 \
-e SEATA_CONFIG_NAME=file:/root/seata-config/registry \
-v /User/seata/config:/root/seata-config \
seataio/seata-server
```
其中 `-e` 用于配置环境变量, `-v` 用于挂载宿主机的目录
- 指定 file.conf
如果需要同时指定 `file.conf` 配置文件,则需要在 `registry.conf` 文件中将 `config` 配置改为以下内容,`name` 的值为容器中对应的路径
```
config {
type = "file"
file {
name = "file:/root/seata-config/file.conf"
}
}
```
## 环境变量
seata-server 支持以下环境变量:
- **SEATA_IP**
> 可选, 指定seata-server启动的IP, 该IP用于向注册中心注册时使用, 如eureka等
- **SEATA_PORT**
> 可选, 指定seata-server启动的端口, 默认为 `8091`
- **STORE_MODE**
> 可选, 指定seata-server的事务日志存储方式, 支持`db` ,`file`,redis(Seata-Server 1.3及以上版本支持), 默认是 `file`
- **SERVER_NODE**
> 可选, 用于指定seata-server节点ID, 如 `1`,`2`,`3`..., 默认为 `根据ip生成`
- **SEATA_ENV**
> 可选, 指定 seata-server 运行环境, 如 `dev`, `test` 等, 服务启动时会使用 `registry-dev.conf` 这样的配置
- **SEATA_CONFIG_NAME**
> 可选, 指定配置文件位置, 如 `file:/root/registry`, 将会加载 `/root/registry.conf` 作为配置文件,如果需要同时指定 `file.conf`文件,需要将`registry.conf`的`config.file.name`的值改为类似`file:/root/file.conf`

View File

@ -0,0 +1,333 @@
---
hidden: true
title: 使用 Docker compose 快速部署 Seata Server
keywords: docker-compose,ops
description: 使用 Docker-compose 快速部署 Seata Server
author: zouwei
date: 2021-12-05
---
# 使用 docker-compose 部署 Seata Server
## 历史版本部署
[1.5.0以前版本](https://seata.io/zh-cn/docs/ops/deploy-by-docker-compose-142.html)
[1.5.0以后版本(含1.5.0)](https://seata.io/zh-cn/docs/ops/deploy-by-docker-compose.html)
## 注意事项
- 避免直接拉取latest版本镜像latest版本并不一定是released版本为避免不必要的问题请到[docker镜像仓库](https://hub.docker.com/r/seataio/seata-server/tags)确定要拉取的镜像版本。
## 快速开始
* <a href="#file-file">无注册中心file存储</a>
* <a href="#file-db">无注册中心db存储</a>
* <a href="#nacos-db">nacos注册中心db存储</a>
* <a href="#ha-nacos-db">高可用部署</a>
### <a id="file-file">无注册中心file存储</a>
该模式下,不需要注册中心,也不需要任何第三方存储中心。
docker-compose.yaml
```yaml
version: "3.1"
services:
seata-server:
image: seataio/seata-server:${latest-release-version}
hostname: seata-server
ports:
- "8091:8091"
environment:
- SEATA_PORT=8091
- STORE_MODE=file
```
### <a id="file-db">无注册中心DB存储</a>
> db模式需要在数据库创建对应的表结构<a href="https://github.com/seata/seata/tree/develop/script/server/db">[建表脚本]</a>
**1准备file.conf配置文件**
更多存储模式支持可参考<a href="https://github.com/seata/seata/blob/develop/script/config-center/config.txt">更多存储模式</a>
```properties
# 存储模式
store.mode=db
store.db.datasource=druid
store.db.dbType=mysql
# 需要根据mysql的版本调整driverClassName
# mysql8及以上版本对应的drivercom.mysql.cj.jdbc.Driver
# mysql8以下版本的drivercom.mysql.jdbc.Driver
store.db.driverClassName=com.mysql.cj.jdbc.Driver
# 注意根据生产实际情况调整参数host和port
store.db.url=jdbc:mysql://127.0.0.1:3306/seata-server?useUnicode=true&characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useSSL=false
# 数据库用户名
store.db.user=
# 用户名密码
store.db.password=
```
**2准备registry.conf文件**
更多注册中心支持可参考<a href="https://seata.io/zh-cn/docs/user/registry/index.html">注册中心</a>
更多配置中心支持可参考<a href="https://seata.io/zh-cn/docs/user/configuration/index.html">配置中心</a>
直连模式(无注册中心)
```
registry {
type = "file"
}
config {
type = "file"
file {
name="file:/root/seata-config/file.conf"
}
}
```
**3准备docker-compose.yaml文件**
```yaml
version: "3.1"
services:
seata-server:
image: seataio/seata-server:${latest-release-version}
hostname: seata-server
ports:
- "8091:8091"
environment:
- SEATA_PORT=8091
- SEATA_CONFIG_NAME=file:/root/seata-config/registry
volumes:
# 需要把file.conf和registry.conf都放到./seata-server/config文件夹中
- "./seata-server/config:/root/seata-config"
```
### <a id="nacos-db">nacos注册中心db存储</a>
> db模式需要在数据库创建对应的表结构<a href="https://github.com/seata/seata/tree/develop/script/server/db">[建表脚本]</a>
**1准备registry.conf文件**
nacos注册中心。
更多注册中心支持可参考<a href="https://seata.io/zh-cn/docs/user/registry/index.html">注册中心</a>
更多配置中心支持可参考<a href="https://seata.io/zh-cn/docs/user/configuration/index.html">配置中心</a>
```
registry {
type = "nacos"
nacos {
# seata服务注册在nacos上的别名客户端通过该别名调用服务
application = "seata-server"
# 请根据实际生产环境配置nacos服务的ip和端口
serverAddr = "127.0.0.1:8848"
# nacos上指定的namespace
namespace = ""
cluster = "default"
username = "nacos"
password = "nacos"
}
}
config {
type = "nacos"
nacos {
# 请根据实际生产环境配置nacos服务的ip和端口
serverAddr = "127.0.0.1:8848"
# nacos上指定的namespace
namespace = ""
group = "SEATA_GROUP"
username = "nacos"
password = "nacos"
# 从v1.4.2版本开始已支持从一个Nacos dataId中获取所有配置信息,你只需要额外添加一个dataId配置项
dataId: "seataServer.properties"
}
}
```
**2准备nacos配置中心配置**
更多存储模式支持可参考<a href="https://github.com/seata/seata/blob/develop/script/config-center/config.txt">更多存储模式</a>
> 你需要在nacos新建配置此处dataId为seataServer.properties
```properties
# 存储模式
store.mode=db
store.db.datasource=druid
store.db.dbType=mysql
# 需要根据mysql的版本调整driverClassName
# mysql8及以上版本对应的drivercom.mysql.cj.jdbc.Driver
# mysql8以下版本的drivercom.mysql.jdbc.Driver
store.db.driverClassName=com.mysql.cj.jdbc.Driver
# 注意根据生产实际情况调整参数host和port
store.db.url=jdbc:mysql://127.0.0.1:3306/seata-server?useUnicode=true&characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useSSL=false
# 数据库用户名
store.db.user=
# 用户名密码
store.db.password=
```
**3准备docker-compose.yaml文件**
```yaml
version: "3.1"
services:
seata-server:
image: seataio/seata-server:${latest-release-version}
hostname: seata-server
ports:
- "8091:8091"
environment:
# 指定seata服务启动端口
- SEATA_PORT=8091
# 注册到nacos上的ip。客户端将通过该ip访问seata服务。
# 注意公网ip和内网ip的差异。
- SEATA_IP=127.0.0.1
- SEATA_CONFIG_NAME=file:/root/seata-config/registry
volumes:
# 因为registry.conf中是nacos配置中心只需要把registry.conf放到./seata-server/config文件夹中
- "./seata-server/config:/root/seata-config"
```
### <a id="ha-nacos-db">高可用部署</a>
> seata高可用依赖于注册中心、数据库可不依赖配置中心。
> db模式需要在数据库创建对应的表结构<a href="https://github.com/seata/seata/tree/develop/script/server/db">[建表脚本]</a>
**1准备file.conf配置文件**
更多存储模式支持可参考<a href="https://github.com/seata/seata/blob/develop/script/config-center/config.txt">更多存储模式</a>
```properties
# 存储模式
store.mode=db
store.db.datasource=druid
store.db.dbType=mysql
# 需要根据mysql的版本调整driverClassName
# mysql8及以上版本对应的drivercom.mysql.cj.jdbc.Driver
# mysql8以下版本的drivercom.mysql.jdbc.Driver
store.db.driverClassName=com.mysql.cj.jdbc.Driver
# 注意根据生产实际情况调整参数host和port
store.db.url=jdbc:mysql://127.0.0.1:3306/seata-server?useUnicode=true&characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useSSL=false
# 数据库用户名
store.db.user=
# 用户名密码
store.db.password=
```
**2准备registry.conf文件**
nacos注册中心。
更多注册中心支持可参考<a href="https://seata.io/zh-cn/docs/user/registry/index.html">注册中心</a>
更多配置中心支持可参考<a href="https://seata.io/zh-cn/docs/user/configuration/index.html">配置中心</a>
```
registry {
type = "nacos"
nacos {
# seata服务注册在nacos上的别名客户端通过该别名调用服务
application = "seata-server"
# nacos服务的ip和端口
serverAddr = "127.0.0.1:8848"
# nacos上指定的namespace
namespace = ""
cluster = "default"
username = "nacos"
password = "nacos"
}
}
config {
type = "file"
file {
name="file:/root/seata-config/file.conf"
}
}
```
**3准备docker-compose.yaml文件**
> 只要保持配置一致seata服务可在一台机器上部署多实例也可同时部署在多台不同的主机下面实现服务高可用。
> [高可用部署](https://seata.io/zh-cn/docs/ops/deploy-ha.html)
```yaml
version: "3.1"
services:
# seata服务1
seata-server-1:
image: seataio/seata-server:${latest-release-version}
hostname: seata-server
ports:
- "8091:8091"
environment:
# 指定seata服务启动端口
- SEATA_PORT=8091
# 注册到nacos上的ip。客户端将通过该ip访问seata服务。
# 注意公网ip和内网ip的差异。
- SEATA_IP=127.0.0.1
- SEATA_CONFIG_NAME=file:/root/seata-config/registry
volumes:
# 需要把file.conf和registry.conf都放到./seata-server/config文件夹中
- "./seata-server/config:/root/seata-config"
# seata服务2
seata-server-2:
image: seataio/seata-server:${latest-release-version}
hostname: seata-server
ports:
- "8092:8092"
environment:
# 指定seata服务启动端口
- SEATA_PORT=8092
# 注册到nacos上的ip。客户端将通过该ip访问seata服务。
# 注意公网ip和内网ip的差异。
- SEATA_IP=127.0.0.1
- SEATA_CONFIG_NAME=file:/root/seata-config/registry
volumes:
# 需要把file.conf和registry.conf都放到./seata-server/config文件夹中
- "./seata-server/config:/root/seata-config"
# seata服务3......seata服务N
```
## 环境变量
seata-server 支持以下环境变量:
- **SEATA_IP**
> 可选, 指定seata-server启动的IP, 该IP用于向注册中心注册时使用, 如eureka等
- **SEATA_PORT**
> 可选, 指定seata-server启动的端口, 默认为 `8091`
- **STORE_MODE**
> 可选, 指定seata-server的事务日志存储方式, 支持`db`, `file`, `redis`(Seata-Server 1.3及以上版本支持), 默认是 `file`
- **SERVER_NODE**
> 可选, 用于指定seata-server节点ID, 如 `1`,`2`,`3`..., 默认为 `根据ip生成`
- **SEATA_ENV**
> 可选, 指定 seata-server 运行环境, 如 `dev`, `test` 等, 服务启动时会使用 `registry-dev.conf` 这样的配置
- **SEATA_CONFIG_NAME**
> 可选, 指定配置文件位置, 如 `file:/root/registry`, 将会加载 `/root/registry.conf` 作为配置文件,如果需要同时指定 `file.conf`文件,需要将`registry.conf`的`config.file.name`的值改为类似`file:/root/file.conf`

View File

@ -4,13 +4,38 @@ title: 使用 Docker compose 快速部署 Seata Server
keywords: docker-compose,ops
description: 使用 Docker-compose 快速部署 Seata Server
author: zouwei
date: 2021-12-05
date: 2022-09-06
---
# 使用 docker-compose 部署 Seata Server
## 历史版本部署
[1.5.0以前版本](https://seata.io/zh-cn/docs/ops/deploy-by-docker-compose-142.html)
[1.5.0以后版本(含1.5.0)](https://seata.io/zh-cn/docs/ops/deploy-by-docker-compose.html)
## 注意事项
- 避免直接拉取latest版本镜像latest版本并不一定是released版本为避免不必要的问题请到[docker镜像仓库](https://hub.docker.com/r/seataio/seata-server/tags)确定要拉取的镜像版本。
- Seata Server 1.5.0版本开始配置文件改为application.yml所以在使用自定义配置的时候需要先把原生配置拷贝出来。
## 使用自定义配置文件
为了获取seata server 1.5.0的配置文件我们需要先启动一个seata server 1.5.0的服务,然后再从启动的容器实例中把默认的配置文件复制出来,再进行修改。
docker-compose.yaml
```yaml
version: "3.1"
services:
seata-server:
image: seataio/seata-server:${latest-release-version}
ports:
- "7091:7091"
- "8091:8091"
```
接下来通过`docker cp`命令把容器中`/seata-server/resources`位置的资源文件拷贝到宿主机指定位置。
在宿主机指定位置我们就可以看到对应的`application.yml`配置文件,相关的配置只需要修改这个文件即可。
> `application.yml`配置可参考[application.example.yml](https://github.com/seata/seata/blob/develop/server/src/main/resources/application.example.yml)
## 快速开始
@ -31,6 +56,7 @@ services:
image: seataio/seata-server:${latest-release-version}
hostname: seata-server
ports:
- "7091:7091"
- "8091:8091"
environment:
- SEATA_PORT=8091
@ -41,109 +67,153 @@ services:
> db模式需要在数据库创建对应的表结构<a href="https://github.com/seata/seata/tree/develop/script/server/db">[建表脚本]</a>
**1准备file.conf配置文件**
**1application.yml配置文件**
`application.yml`配置可参考[application.example.yml](https://github.com/seata/seata/blob/develop/server/src/main/resources/application.example.yml)
更多存储模式支持可参考<a href="https://github.com/seata/seata/blob/develop/script/config-center/config.txt">更多存储模式</a>
```properties
# 存储模式
store.mode=db
```yaml
server:
port: 7091
store.db.datasource=druid
store.db.dbType=mysql
# 需要根据mysql的版本调整driverClassName
# mysql8及以上版本对应的drivercom.mysql.cj.jdbc.Driver
# mysql8以下版本的drivercom.mysql.jdbc.Driver
store.db.driverClassName=com.mysql.cj.jdbc.Driver
# 注意根据生产实际情况调整参数host和port
store.db.url=jdbc:mysql://127.0.0.1:3306/seata-server?useUnicode=true&characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useSSL=false
# 数据库用户名
store.db.user=
# 用户名密码
store.db.password=
spring:
application:
name: seata-server
logging:
config: classpath:logback-spring.xml
file:
path: ${user.home}/logs/seata
extend:
logstash-appender:
destination: 127.0.0.1:4560
kafka-appender:
bootstrap-servers: 127.0.0.1:9092
topic: logback_to_logstash
console:
user:
username: seata
password: seata
seata:
config:
# support: nacos, consul, apollo, zk, etcd3
type: file
registry:
# support: nacos, eureka, redis, zk, consul, etcd3, sofa
type: file
store:
# support: file 、 db 、 redis
mode: db
db:
datasource: druid
dbType: mysql
# 需要根据mysql的版本调整driverClassName
# mysql8及以上版本对应的drivercom.mysql.cj.jdbc.Driver
# mysql8以下版本的drivercom.mysql.jdbc.Driver
driverClassName: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/seata-server?useUnicode=true&characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useSSL=false
user: 用户名
password: 密码
# server:
# service-port: 8091 #If not configured, the default is '${server.port} + 1000'
security:
secretKey: SeataSecretKey0c382ef121d778043159209298fd40bf3850a017
tokenValidityInMilliseconds: 1800000
ignore:
urls: /,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/api/v1/auth/login
```
**2准备registry.conf文件**
更多注册中心支持可参考<a href="https://seata.io/zh-cn/docs/user/registry/index.html">注册中心</a>
更多配置中心支持可参考<a href="https://seata.io/zh-cn/docs/user/configuration/index.html">配置中心</a>
直连模式(无注册中心)
```
registry {
type = "file"
}
config {
type = "file"
file {
name="file:/root/seata-config/file.conf"
}
}
```
**3准备docker-compose.yaml文件**
**2准备docker-compose.yaml文件**
```yaml
version: "3.1"
services:
seata-server:
image: seataio/seata-server:${latest-release-version}
hostname: seata-server
image: seataio/seata-server:1.5.2
ports:
- "7091:7091"
- "8091:8091"
environment:
- STORE_MODE=db
# 以SEATA_IP作为host注册seata server
- SEATA_IP=seata_ip
- SEATA_PORT=8091
- SEATA_CONFIG_NAME=file:/root/seata-config/registry
volumes:
# 需要把file.conf和registry.conf都放到./seata-server/config文件夹中
- "./seata-server/config:/root/seata-config"
- "/usr/share/zoneinfo/Asia/Shanghai:/etc/localtime" #设置系统时区
- "/usr/share/zoneinfo/Asia/Shanghai:/etc/timezone" #设置时区
# 假设我们通过docker cp命令把资源文件拷贝到相对路径`./seata-server/resources`中
# 如有问题,请阅读上面的[注意事项]以及[使用自定义配置文件]
- "./seata-server/resources:/seata-server/resources"
```
### <a id="nacos-db">nacos注册中心db存储</a>
> db模式需要在数据库创建对应的表结构<a href="https://github.com/seata/seata/tree/develop/script/server/db">[建表脚本]</a>
**1准备registry.conf文件**
**1application.yml配置文件**
`application.yml`配置可参考[application.example.yml](https://github.com/seata/seata/blob/develop/server/src/main/resources/application.example.yml)
nacos注册中心。
更多注册中心支持可参考<a href="https://seata.io/zh-cn/docs/user/registry/index.html">注册中心</a>
```yaml
server:
port: 7091
更多配置中心支持可参考<a href="https://seata.io/zh-cn/docs/user/configuration/index.html">配置中心</a>
spring:
application:
name: seata-server
```
registry {
type = "nacos"
nacos {
# seata服务注册在nacos上的别名客户端通过该别名调用服务
application = "seata-server"
# 请根据实际生产环境配置nacos服务的ip和端口
serverAddr = "127.0.0.1:8848"
# nacos上指定的namespace
namespace = ""
cluster = "default"
username = "nacos"
password = "nacos"
}
}
logging:
config: classpath:logback-spring.xml
file:
path: ${user.home}/logs/seata
extend:
logstash-appender:
destination: 127.0.0.1:4560
kafka-appender:
bootstrap-servers: 127.0.0.1:9092
topic: logback_to_logstash
config {
type = "nacos"
nacos {
# 请根据实际生产环境配置nacos服务的ip和端口
serverAddr = "127.0.0.1:8848"
# nacos上指定的namespace
namespace = ""
group = "SEATA_GROUP"
username = "nacos"
password = "nacos"
# 从v1.4.2版本开始已支持从一个Nacos dataId中获取所有配置信息,你只需要额外添加一个dataId配置项
dataId: "seataServer.properties"
}
}
console:
user:
username: seata
password: seata
seata:
config:
# support: nacos, consul, apollo, zk, etcd3
type: nacos
nacos:
server-addr: nacos_ip:nacos_port
namespace: seata-server
group: SEATA_GROUP
username: nacos
password: nacos
data-id: seataServer.properties
registry:
# support: nacos, eureka, redis, zk, consul, etcd3, sofa
type: nacos
nacos:
application: seata-server
server-addr: nacos_ip:nacos_port
group: SEATA_GROUP
namespace: seata-server
# tc集群名称
cluster: default
username: nacos
password: nacos
# server:
# service-port: 8091 #If not configured, the default is '${server.port} + 1000'
security:
secretKey: SeataSecretKey0c382ef121d778043159209298fd40bf3850a017
tokenValidityInMilliseconds: 1800000
ignore:
urls: /,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/api/v1/auth/login
```
**2准备nacos配置中心配置**
@ -153,21 +223,51 @@ config {
> 你需要在nacos新建配置此处dataId为seataServer.properties
```properties
# 存储模式
store.mode=db
#-----db-----
store.db.datasource=druid
store.db.dbType=mysql
# 需要根据mysql的版本调整driverClassName
# mysql8及以上版本对应的drivercom.mysql.cj.jdbc.Driver
# mysql8以下版本的drivercom.mysql.jdbc.Driver
store.db.driverClassName=com.mysql.cj.jdbc.Driver
# 注意根据生产实际情况调整参数host和port
store.db.url=jdbc:mysql://127.0.0.1:3306/seata-server?useUnicode=true&characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useSSL=false
# 数据库用户名
store.db.user=
# 用户名密码
store.db.password=
store.db.user= 用户名
store.db.password=密码
# 数据库初始连接数
store.db.minConn=1
# 数据库最大连接数
store.db.maxConn=20
# 获取连接时最大等待时间 默认5000单位毫秒
store.db.maxWait=5000
# 全局事务表名 默认global_table
store.db.globalTable=global_table
# 分支事务表名 默认branch_table
store.db.branchTable=branch_table
# 全局锁表名 默认lock_table
store.db.lockTable=lock_table
# 查询全局事务一次的最大条数 默认100
store.db.queryLimit=100
# undo保留天数 默认7天,log_status=1附录3和未正常清理的undo
server.undo.logSaveDays=7
# undo清理线程间隔时间 默认86400000单位毫秒
server.undo.logDeletePeriod=86400000
# 二阶段提交重试超时时长 单位ms,s,m,h,d,对应毫秒,秒,分,小时,天,默认毫秒。默认值-1表示无限重试
# 公式: timeout>=now-globalTransactionBeginTime,true表示超时则不再重试
# 注: 达到超时时间后将不会做任何重试,有数据不一致风险,除非业务自行可校准数据,否者慎用
server.maxCommitRetryTimeout=-1
# 二阶段回滚重试超时时长
server.maxRollbackRetryTimeout=-1
# 二阶段提交未完成状态全局事务重试提交线程间隔时间 默认1000单位毫秒
server.recovery.committingRetryPeriod=1000
# 二阶段异步提交状态重试提交线程间隔时间 默认1000单位毫秒
server.recovery.asynCommittingRetryPeriod=1000
# 二阶段回滚状态重试回滚线程间隔时间 默认1000单位毫秒
server.recovery.rollbackingRetryPeriod=1000
# 超时状态检测重试线程间隔时间 默认1000单位毫秒检测出超时将全局事务置入回滚会话管理器
server.recovery.timeoutRetryPeriod=1000
```
@ -176,82 +276,152 @@ store.db.password=
version: "3.1"
services:
seata-server:
image: seataio/seata-server:${latest-release-version}
hostname: seata-server
image: seataio/seata-server:1.5.2
ports:
- "7091:7091"
- "8091:8091"
environment:
# 指定seata服务启动端口
- STORE_MODE=db
# 以SEATA_IP作为host注册seata server
- SEATA_IP=seata_ip
- SEATA_PORT=8091
# 注册到nacos上的ip。客户端将通过该ip访问seata服务。
# 注意公网ip和内网ip的差异。
- SEATA_IP=127.0.0.1
- SEATA_CONFIG_NAME=file:/root/seata-config/registry
volumes:
# 因为registry.conf中是nacos配置中心只需要把registry.conf放到./seata-server/config文件夹中
- "./seata-server/config:/root/seata-config"
- "/usr/share/zoneinfo/Asia/Shanghai:/etc/localtime" #设置系统时区
- "/usr/share/zoneinfo/Asia/Shanghai:/etc/timezone" #设置时区
# 假设我们通过docker cp命令把资源文件拷贝到相对路径`./seata-server/resources`中
# 如有问题,请阅读上面的[注意事项]以及[使用自定义配置文件]
- "./seata-server/resources:/seata-server/resources"
```
### <a id="ha-nacos-db">高可用部署</a>
> seata高可用依赖于注册中心、数据库可不依赖配置中心。
>
> 请保证多个Seata Server使用同一个注册中心和同一个存储中心这样才能形成高可用部署
>
> db模式需要在数据库创建对应的表结构<a href="https://github.com/seata/seata/tree/develop/script/server/db">[建表脚本]</a>
**1准备file.conf配置文件**
**1application.yml配置文件**
`application.yml`配置可参考[application.example.yml](https://github.com/seata/seata/blob/develop/server/src/main/resources/application.example.yml)
更多存储模式支持可参考<a href="https://github.com/seata/seata/blob/develop/script/config-center/config.txt">更多存储模式</a>
```properties
# 存储模式
store.mode=db
```yaml
server:
port: 7091
spring:
application:
name: seata-server
logging:
config: classpath:logback-spring.xml
file:
path: ${user.home}/logs/seata
extend:
logstash-appender:
destination: 127.0.0.1:4560
kafka-appender:
bootstrap-servers: 127.0.0.1:9092
topic: logback_to_logstash
console:
user:
username: seata
password: seata
seata:
config:
# support: nacos, consul, apollo, zk, etcd3
type: nacos
nacos:
server-addr: nacos_ip:nacos_port
namespace: seata-server
group: SEATA_GROUP
usernam: nacos
password: nacos
data-id: seataServer.properties
registry:
# support: nacos, eureka, redis, zk, consul, etcd3, sofa
type: nacos
nacos:
application: seata-server
server-addr: nacos_ip:nacos_port
group: SEATA_GROUP
namespace: seata-server
# tc集群名称
cluster: default
username: nacos
password: nacos
# store:
# support: file 、 db 、 redis
# mode: file
# server:
# service-port: 8091 #If not configured, the default is '${server.port} + 1000'
security:
secretKey: SeataSecretKey0c382ef121d778043159209298fd40bf3850a017
tokenValidityInMilliseconds: 1800000
ignore:
urls: /,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/api/v1/auth/login
```
**2准备nacos配置中心配置**
更多存储模式支持可参考<a href="https://github.com/seata/seata/blob/develop/script/config-center/config.txt">更多存储模式</a>
> 你需要在nacos新建配置此处dataId为seataServer.properties
```properties
store.mode=db
#-----db-----
store.db.datasource=druid
store.db.dbType=mysql
# 需要根据mysql的版本调整driverClassName
# mysql8及以上版本对应的drivercom.mysql.cj.jdbc.Driver
# mysql8以下版本的drivercom.mysql.jdbc.Driver
store.db.driverClassName=com.mysql.cj.jdbc.Driver
# 注意根据生产实际情况调整参数host和port
store.db.url=jdbc:mysql://127.0.0.1:3306/seata-server?useUnicode=true&characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useSSL=false
# 数据库用户名
store.db.user=
# 用户名密码
store.db.password=
```
store.db.user= 用户名
store.db.password=密码
# 数据库初始连接数
store.db.minConn=1
# 数据库最大连接数
store.db.maxConn=20
# 获取连接时最大等待时间 默认5000单位毫秒
store.db.maxWait=5000
# 全局事务表名 默认global_table
store.db.globalTable=global_table
# 分支事务表名 默认branch_table
store.db.branchTable=branch_table
# 全局锁表名 默认lock_table
store.db.lockTable=lock_table
# 查询全局事务一次的最大条数 默认100
store.db.queryLimit=100
**2准备registry.conf文件**
nacos注册中心。
更多注册中心支持可参考<a href="https://seata.io/zh-cn/docs/user/registry/index.html">注册中心</a>
更多配置中心支持可参考<a href="https://seata.io/zh-cn/docs/user/configuration/index.html">配置中心</a>
```
registry {
type = "nacos"
nacos {
# seata服务注册在nacos上的别名客户端通过该别名调用服务
application = "seata-server"
# nacos服务的ip和端口
serverAddr = "127.0.0.1:8848"
# nacos上指定的namespace
namespace = ""
cluster = "default"
username = "nacos"
password = "nacos"
}
}
config {
type = "file"
file {
name="file:/root/seata-config/file.conf"
}
}
# undo保留天数 默认7天,log_status=1附录3和未正常清理的undo
server.undo.logSaveDays=7
# undo清理线程间隔时间 默认86400000单位毫秒
server.undo.logDeletePeriod=86400000
# 二阶段提交重试超时时长 单位ms,s,m,h,d,对应毫秒,秒,分,小时,天,默认毫秒。默认值-1表示无限重试
# 公式: timeout>=now-globalTransactionBeginTime,true表示超时则不再重试
# 注: 达到超时时间后将不会做任何重试,有数据不一致风险,除非业务自行可校准数据,否者慎用
server.maxCommitRetryTimeout=-1
# 二阶段回滚重试超时时长
server.maxRollbackRetryTimeout=-1
# 二阶段提交未完成状态全局事务重试提交线程间隔时间 默认1000单位毫秒
server.recovery.committingRetryPeriod=1000
# 二阶段异步提交状态重试提交线程间隔时间 默认1000单位毫秒
server.recovery.asynCommittingRetryPeriod=1000
# 二阶段回滚状态重试回滚线程间隔时间 默认1000单位毫秒
server.recovery.rollbackingRetryPeriod=1000
# 超时状态检测重试线程间隔时间 默认1000单位毫秒检测出超时将全局事务置入回滚会话管理器
server.recovery.timeoutRetryPeriod=1000
```
**3准备docker-compose.yaml文件**
@ -262,39 +432,40 @@ config {
```yaml
version: "3.1"
services:
# seata服务1
seata-server-1:
image: seataio/seata-server:${latest-release-version}
hostname: seata-server
ports:
- "7091:7091"
- "8091:8091"
environment:
# 指定seata服务启动端口
- STORE_MODE=db
# 以SEATA_IP作为host注册seata server
- SEATA_IP=seata_ip
- SEATA_PORT=8091
# 注册到nacos上的ip。客户端将通过该ip访问seata服务。
# 注意公网ip和内网ip的差异。
- SEATA_IP=127.0.0.1
- SEATA_CONFIG_NAME=file:/root/seata-config/registry
volumes:
# 需要把file.conf和registry.conf都放到./seata-server/config文件夹中
- "./seata-server/config:/root/seata-config"
# seata服务2
- "/usr/share/zoneinfo/Asia/Shanghai:/etc/localtime" #设置系统时区
- "/usr/share/zoneinfo/Asia/Shanghai:/etc/timezone" #设置时区
# 假设我们通过docker cp命令把资源文件拷贝到相对路径`./seata-server/resources`中
# 如有问题,请阅读上面的[注意事项]以及[使用自定义配置文件]
- "./seata-server/resources:/seata-server/resources"
seata-server-2:
image: seataio/seata-server:${latest-release-version}
hostname: seata-server
ports:
- "7092:7091"
- "8092:8092"
environment:
# 指定seata服务启动端口
- STORE_MODE=db
# 以SEATA_IP作为host注册seata server
- SEATA_IP=seata_ip
- SEATA_PORT=8092
# 注册到nacos上的ip。客户端将通过该ip访问seata服务。
# 注意公网ip和内网ip的差异。
- SEATA_IP=127.0.0.1
- SEATA_CONFIG_NAME=file:/root/seata-config/registry
volumes:
# 需要把file.conf和registry.conf都放到./seata-server/config文件夹中
- "./seata-server/config:/root/seata-config"
- "/usr/share/zoneinfo/Asia/Shanghai:/etc/localtime" #设置系统时区
- "/usr/share/zoneinfo/Asia/Shanghai:/etc/timezone" #设置时区
# 假设我们通过docker cp命令把资源文件拷贝到相对路径`./seata-server/resources`中
# 如有问题,请阅读上面的[注意事项]以及[使用自定义配置文件]
- "./seata-server/resources:/seata-server/resources"
# seata服务3......seata服务N
```

View File

@ -7,7 +7,12 @@ author: helloworlde
date: 2019-11-25
---
# 使用 Docker 部署 Seata Server
# 使用 Docker 部署 Seata Server (1.5.0)
<a href="./deploy-by-docker-142.html">查看1.4.2版本</a>
## 注意事项
- 避免直接拉取latest版本镜像latest版本并不一定是released版本为避免不必要的问题请到[docker镜像仓库](https://hub.docker.com/r/seataio/seata-server/tags)确定要拉取的镜像版本。
## 注意事项
- 避免直接拉取latest版本镜像latest版本并不一定是released版本为避免不必要的问题请到[docker镜像仓库](https://hub.docker.com/r/seataio/seata-server/tags)确定要拉取的镜像版本。
@ -17,7 +22,7 @@ date: 2019-11-25
#### 启动seata-server实例
```bash
$ docker run --name seata-server -p 8091:8091 seataio/seata-server:1.4.2
$ docker run --name seata-server -p 8091:8091 -p 7091:7091 seataio/seata-server:1.5.0
```
#### 指定seata-server IP和端口 启动
@ -25,6 +30,7 @@ $ docker run --name seata-server -p 8091:8091 seataio/seata-server:1.4.2
```bash
$ docker run --name seata-server \
-p 8091:8091 \
-p 7091:7091 \
-e SEATA_IP=192.168.1.1 \
-e SEATA_PORT=8091 \
seataio/seata-server
@ -42,6 +48,7 @@ services:
hostname: seata-server
ports:
- "8091:8091"
- "7091:7091"
environment:
- SEATA_PORT=8091
- STORE_MODE=file
@ -61,35 +68,30 @@ $ docker logs -f seata-server
## 使用自定义配置文件
自定义配置文件需要通过挂载文件的方式实现,将宿主机上的 `registry.conf` 和 `file.conf` 挂载到容器中相应的目录
自定义配置文件需要通过挂载文件的方式实现,将宿主机上的 `application.yml` 挂载到容器中相应的目录
- 指定 registry.conf
首先启动一个用户将resources目录文件拷出的临时容器
使用自定义配置文件时必须指定环境变量 `SEATA_CONFIG_NAME`, 并且值需要以`file:`开始, 如: `file:/root/seata-config/registry`
```
docker run -d -p 8091:8091 -p 7091:7091 --name seata-serve seataio/seata-server:latest
docker cp seata-serve:/seata-server/resources /User/seata/config
```
拷出后可以,可以选择修改application.yml再cp进容器,或者rm临时容器,如下重新创建,并做好映射路径设置
- 指定 application.yml
```bash
$ docker run --name seata-server \
-p 8091:8091 \
-e SEATA_CONFIG_NAME=file:/root/seata-config/registry \
-v /User/seata/config:/root/seata-config \
-p 7091:7091 \
-v /User/seata/config:/seata-server/resources \
seataio/seata-server
```
其中 `-e` 用于配置环境变量, `-v` 用于挂载宿主机的目录
其中 `-e` 用于配置环境变量, `-v` 用于挂载宿主机的目录,如果是以file存储模式运行,请加上-v /User/seata/sessionStore :/seata-server/sessionStore 将file的数据文件映射到宿主机,以防数据丢失(注:/User/seata/config和/User/seata/sessionStore可自定义宿主机目录,无需照搬)
- 指定 file.conf
如果需要同时指定 `file.conf` 配置文件,则需要在 `registry.conf` 文件中将 `config` 配置改为以下内容,`name` 的值为容器中对应的路径
```
config {
type = "file"
file {
name = "file:/root/seata-config/file.conf"
}
}
```
接下来你可以看到宿主机对应目录下已经有了,logback-spring.xml,application.example.yml,application.yml 如果比较熟悉springboot,那么接下来就很简单了,只需要修改application.yml即可,详细配置可以参考application.example.yml,该文件存放了所有可使用的详细配置
## 环境变量

View File

@ -5,11 +5,11 @@ description: Seata分TC、TM和RM三个角色TCServer端为单独服务
---
# 部署指南
## Seata新手部署指南(1.4.0版本)
## Seata新手部署指南
Seata分TC、TM和RM三个角色TCServer端为单独服务端部署TM和RMClient端由业务系统集成。
### 资源目录介绍
#### <a href="https://github.com/seata/seata/tree/1.4.0/script" target="_blank">点击查看</a>
#### <a href="https://github.com/seata/seata/tree/master/script" target="_blank">点击查看(或根据版本分支选择对应的资源目录)</a>
- client
> 存放client端sql脚本 (包含 undo_log表) ,参数配置
- config-center
@ -43,7 +43,7 @@ Seata分TC、TM和RM三个角色TCServer端为单独服务端部署T
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-seata</artifactId>
<version>2.2.1.RELEASE</version>
<version>最新版本</version>
<exclusions>
<exclusion>
<groupId>io.seata</groupId>
@ -72,14 +72,32 @@ redis模式Seata-Server 1.3及以上版本支持,性能较高,存在事务信息
全局事务会话信息由3块内容构成全局事务-->分支事务-->全局锁对应表global_table、branch_table、lock_table
#### 步骤三修改store.mode
启动包: seata-->conf-->application.yml修改store.mode="db或者redis"
源码: 根目录-->seata-server-->resources-->application.yml修改store.mode="db或者redis"
1.5.0以下版本:
启动包: seata-->conf-->file.conf修改store.mode="db或者redis"
源码: 根目录-->seata-server-->resources-->file.conf修改store.mode="db或者redis"
#### 步骤四:修改数据库连接|redis属性配置
启动包: seata-->conf-->application.example.yml中附带额外配置将其db|redis相关配置复制至application.yml,进行修改store.db或store.redis相关属性。
源码: 根目录-->seata-server-->resources-->application.example.yml中附带额外配置将其db|redis相关配置复制至application.yml,进行修改store.db或store.redis相关属性。
1.5.0以下版本:
启动包: seata-->conf-->file.conf修改store.db或store.redis相关属性。
源码: 根目录-->seata-server-->resources-->file.conf修改store.db或store.redis相关属性。
#### 步骤五:启动
- 源码启动: 执行ServerApplication.java的main方法
- 命令启动: seata-server.sh -h 127.0.0.1 -p 8091 -m db
1.5.0以下版本
- 源码启动: 执行Server.java的main方法
- 命令启动: seata-server.sh -h 127.0.0.1 -p 8091 -m db -n 1 -e test
```
@ -98,7 +116,7 @@ redis模式Seata-Server 1.3及以上版本支持,性能较高,存在事务信息
- 依赖seata-all
- 依赖seata-spring-boot-starter支持yml、properties配置(.conf可删除)内部已依赖seata-all
- 依赖spring-cloud-alibaba-seata内部集成了seata并实现了xid传递
#### 步骤二undo_log建表、配置参数
#### 步骤二undo_log建表、配置参数(仅AT模式)
- <a href="https://seata.io/zh-cn/docs/user/configurations.html" target="_blank">查看参数配置介绍</a>
#### 步骤三:数据源代理(不支持自动和手动配置并存)
@ -146,7 +164,7 @@ redis模式Seata-Server 1.3及以上版本支持,性能较高,存在事务信息
seata:
enable-auto-data-source-proxy: false
```
#### 步骤四初始化GlobalTransactionScanner
- 手动
``` @Bean
@ -168,3 +186,86 @@ redis模式Seata-Server 1.3及以上版本支持,性能较高,存在事务信息
参考源码integration文件夹下的各种rpc实现 module
- 自动
springCloud用户可以引入spring-cloud-starter-alibaba-seata内部已经实现xid传递
## 业务使用
### 注解拦截
#### 全局事务
```java
@GetMapping(value = "testCommit")
@GlobalTransactional
public Object testCommit(@RequestParam(name = "id",defaultValue = "1") Integer id,
@RequestParam(name = "sum", defaultValue = "1") Integer sum) {
Boolean ok = productService.reduceStock(id, sum);
if (ok) {
LocalDateTime now = LocalDateTime.now();
Orders orders = new Orders();
orders.setCreateTime(now);
orders.setProductId(id);
orders.setReplaceTime(now);
orders.setSum(sum);
orderService.save(orders);
return "ok";
} else {
return "fail";
}
}
```
#### TCC
```java
/**
* 定义两阶段提交 name = 该tcc的bean名称,全局唯一 commitMethod = commit 为二阶段确认方法 rollbackMethod = rollback 为二阶段取消方法
* useTCCFence=true 为开启防悬挂
* BusinessActionContextParameter注解 传递参数到二阶段中
*
* @param params -入参
* @return String
*/
@TwoPhaseBusinessAction(name = "beanName", commitMethod = "commit", rollbackMethod = "rollback", useTCCFence = true)
public void insert(@BusinessActionContextParameter(paramName = "params") Map<String, String> params) {
logger.info("此处可以预留资源,或者利用tcc的特点,与AT混用,二阶段时利用一阶段在此处存放的消息,通过二阶段发出,比如redis,mq等操作");
}
/**
* 确认方法、可以另命名但要保证与commitMethod一致 context可以传递try方法的参数
*
* @param context 上下文
* @return boolean
*/
public void commit(BusinessActionContext context) {
logger.info("预留资源真正处理,或者发出mq消息和redis入库");
}
/**
* 二阶段取消方法
*
* @param context 上下文
* @return boolean
*/
public void rollback(BusinessActionContext context) {
logger.info("预留资源释放,或清除一阶段准备让二阶段提交时发出的消息缓存");
}
```
### 切点表达式
#### 全局事务
```java
@Bean
public AspectTransactionalInterceptor aspectTransactionalInterceptor () {
return new AspectTransactionalInterceptor();
}
@Bean
public Advisor txAdviceAdvisor(AspectTransactionalInterceptor aspectTransactionalInterceptor ) {
AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();
pointcut.setExpression("配置切点表达式使全局事务拦截器生效");
return new DefaultPointcutAdvisor(pointcut, aspectTransactionalInterceptor);
}
```

View File

@ -6,6 +6,10 @@ description: Seata upgrade.
# 版本升级指南
<a href="#7" target="_self">7. 升级到 seata 1.6.x 有哪些兼容性事项是需要注意的?</a>
<a href="#6" target="_self">6. 升级到 seata 1.5.0 有哪些兼容性事项是需要注意的?</a>
<a href="#5" target="_self">5. 升级到 seata 1.4.0 有哪些兼容性事项是需要注意的?</a>
<a href="#4" target="_self">4. 升级到 seata 1.3.0 有哪些兼容性事项是需要注意的?</a>
@ -15,6 +19,35 @@ description: Seata upgrade.
<a href="#1" target="_self">1. 0.8、0.9版本如何升级到1.0版本?</a>
------
<h3 id='7'>7. 升级到 seata 1.6.x 有哪些兼容性事项是需要注意的?</h3>
<details>
<summary><mark>注意事项</mark></summary>
从1.5.x 版本升级1.6.x 版本,无论 client SDK 还是 seata-server 都是完全平滑兼容的,无需除升级版本外的其他改动。
</details>
------
<h3 id='6'>6. 升级到 seata 1.5.0 有哪些兼容性事项是需要注意的?</h3>
<details>
<summary><mark>注意事项</mark></summary>
1. seata-server 存储模式为 db 时需要注意表结构变更在升级1.5.0 前需先变更表结构:
- 表结构字符集统一从 utf8 调整为 utf8mb4
- global_table 调整索引从 idx_gmt_modified_status 调整为 idx_status_gmt_modified
- lock_table 增加 status 字段,增加 idx_statusidx_xid_and_branch_id 索引
- 增加 distributed_lock 表用于 seata-server 异步任务调度
升级1.5.0前,请注意表结构变更,表结构详情请[点击此处](https://github.com/seata/seata/tree/1.5.0/script/server/db)
2. TCC事务模式在1.5.0 增加防悬挂功能,如需由 Seata 框架开启防悬挂,需要提前在客户端业务库中增加[此表](https://github.com/seata/seata/tree/1.5.0/script/client/tcc/db)
3. TCC模式一阶段方法进行了优化不再需要在一阶段的接口入参定义`BusinessActionContext`,若一阶段需要使用到`BusinessActionContext`,可以通过`BusinessActionContextUtil.getContext()`取得
4. redis注册中心内部结构调整,不再向下兼容,如使用redis作为seata的注册中心,请将客户端依赖的 seata-all(seata-spring-boot-starter) 和 seata-server 一并升级。
5. 事务分组配置支持了默认值,为了避免歧义和降低学习成本,默认事务分组的由`my_test_tx_group` 修改为 `default_tx_group`。在1.5.X的版本中会向下进行兼容。
</details>
------

View File

@ -55,7 +55,7 @@ description: Seata 常见问题。
<a href="#24" target="_self">24. SpringCloud xid无法传递 </a>
<a href="#25" target="_self">25. 使用mybatis-plus 动态数据源组件后undolog无法删除 </a>
<a href="#25" target="_self">25. 使用动态数据源后的常见问题 </a>
<a href="#26" target="_self">26. Could not found global transaction xid = %s, may be has finished.</a>
@ -83,6 +83,18 @@ Error: A fatal exception has occurred. Program will exit.导致seata-server无
<a href="#37" target="_self">37. 为什么在客户端在编译和运行时 JDK 版本都是 1.8 的情况下还会出现 java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer 错误 ? </a>
<a href="#38" target="_self">38. 为什么在使用Apple的M1芯片下载maven依赖时无法下载依赖`com.google.protobuf:protoc:exe:3.3.0` </a>
<a href="#39" target="_self">39. 1.4.2及以下版本回滚时抛出Cannot construct instance of `java.time.LocalDateTime` </a>
<a href="#40" target="_self">40. Seata-Server 使用 DB 作为存储模式时,有哪些注意事项? </a>
<a href="#41" target="_self">41. Oracle使用timestamp字段类型回滚失败 </a>
<a href="#42" target="_self">42. 抛出异常后事务未回滚? </a>
<a href="#43" target="_self">43. 怎么处理@FeignClient注解url不起效提示 Load balancer does not have available server for client错误 </a>
********
<h3 id='1'>Q: 1.Seata 目前可以用于生产环境吗?</h3>
@ -109,11 +121,11 @@ Error: A fatal exception has occurred. Program will exit.导致seata-server无
**A:**
因seata一阶段本地事务已提交为防止其他事务脏读脏写需要加强隔离。
1. 脏读 select语句加for update代理方法增加@GlobalLock+@Transactional或@GlobalTransaction
2. 脏写 必须使用@GlobalTransaction
如果你查询的业务的接口没有GlobalTransactional 包裹,也就是这个方法上压根没有分布式事务的需求,这时你可以在方法上标注@GlobalLock+@Transactional 注解,并且在查询语句上加 for update。
如果你查询的接口在事务链路上外层有GlobalTransactional注解那么你查询的语句只要加for update就行。设计这个注解的原因是在没有这个注解之前需要查询分布式事务读已提交的数据但业务本身不需要分布式事务。
若使用GlobalTransactional注解就会增加一些没用的额外的rpc开销比如begin 返回xid提交事务等。GlobalLock简化了rpc过程使其做到更高的性能。
1. 脏读 select语句加for update代理方法增加@GlobalLock+@Transactional或@GlobalTransactional
2. 脏写 必须使用@GlobalTransactional
注:如果你查询的业务的接口没有@GlobalTransactional 包裹,也就是这个方法上压根没有分布式事务的需求,这时你可以在方法上标注@GlobalLock+@Transactional 注解,并且在查询语句上加 for update。
如果你查询的接口在事务链路上外层有@GlobalTransactional注解那么你查询的语句只要加for update就行。设计这个注解的原因是在没有这个注解之前需要查询分布式事务读已提交的数据但业务本身不需要分布式事务。
若使用@GlobalTransactional注解就会增加一些没用的额外的rpc开销比如begin 返回xid提交事务等。GlobalLock简化了rpc过程使其做到更高的性能。
********
<h3 id='5'>Q: 5.脏数据回滚失败如何处理?</h3>
@ -208,7 +220,7 @@ ps: oracle同理;1.2.0支持mysql驱动多版本隔离无需再添加驱动
<h3 id='13'>Q: 13.支持多主键?</h3>
**A:**
暂时只支持mysql其他类型数据库建议先建一列自增id主键原复合主键改为唯一键来规避下
目前支持mysqloraclepgsqlmariadb其他类型数据库建议先建一列自增id主键原复合主键改为唯一键来规避下
********
<h3 id='14'>Q: 14.使用HikariDataSource报错如何解决?</h3>
@ -244,8 +256,7 @@ ps: oracle同理;1.2.0支持mysql驱动多版本隔离无需再添加驱动
**A:**
```
1. AT 模式支持Dubbo、Spring Cloud、Motan、gRPC 和 sofa-RPC。
2. TCC 模式支持Dubbo、Spring Cloud和sofa-RPC。
目前支持 Dubbo、Spring Cloud、Motan、gRPC、sofa-RPC、EDAS-HSF 和 bRPC 框架。
```
********
<h3 id='18'>Q: 18. java.lang.NoSuchMethodError: com.alibaba.druid.sql.ast.statement
@ -307,7 +318,7 @@ java.lang.NoSuchMethodError: com.alibaba.dubbo.rpc.Invoker.invoke(Lcom/alibaba/d
**A:**
@Transactional 可与 DataSourceTransactionManager 和 JTATransactionManager 连用分别表示本地事务和XA分布式事务大家常用的是与本地事务结合。当与本地事务结合时@Transactional和@GlobalTransaction连用@Transactional 只能位于标注在@GlobalTransaction的同一方法层次或者位于@GlobalTransaction 标注方法的内层。这里分布式事务的概念要大于本地事务,若将 @Transactional 标注在外层会导致分布式事务空提交,当@Transactional 对应的 connection 提交时会报全局事务正在提交或者全局事务的xid不存在。
@Transactional 可与 DataSourceTransactionManager 和 JTATransactionManager 连用分别表示本地事务和XA分布式事务大家常用的是与本地事务结合。当与本地事务结合时@Transactional和@GlobalTransactional连用,@Transactional 只能位于标注在@GlobalTransactional的同一方法层次或者位于@GlobalTransaction 标注方法的内层。这里分布式事务的概念要大于本地事务,若将 @Transactional 标注在外层会导致分布式事务空提交,当@Transactional 对应的 connection 提交时会报全局事务正在提交或者全局事务的xid不存在。
********
<h3 id='23'>Q: 23. Spring boot 1.5.x 出现 jackson 相关 NoClassDefFoundException </h3>
@ -333,9 +344,9 @@ Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.faster
------
<h3 id='25'>Q: 25. 使用mybatis-plus 动态数据源组件后undolog无法删除 </h3>
<h3 id='25'>Q: 25. 使用动态数据源后的常见问题 </h3>
**A:**
**A:** 使用dynamic-datasource-spring-boot-starter组件后undolog无法删除,或使用AbstractRoutingDataSource等动态数据源后无法正常回滚
dynamic-datasource-spring-boot-starter 组件内部开启seata后会自动使用DataSourceProxy来包装DataSource,所以需要以下方式来保持兼容
@ -346,8 +357,14 @@ dynamic-datasource-spring-boot-starter 组件内部开启seata后会自动使用
```yaml
seata:
enable-auto-data-source-proxy: false
```
********
如果是后者,保证以上两项处理后,请不要手动代码AbstractRoutingDataSource等动态数据源,而是将其实际使用的物理datasource进行代理,具体可参考如下例子[seata-samples/DataSourceProxyConfig.java at master · seata/seata-samples (github.com)](https://github.com/seata/seata-samples/blob/master/multiple-datasource-mybatis-plus/src/main/java/io/seata/samples/mutiple/mybatisplus/config/DataSourceProxyConfig.java)
------
<h3 id='26'>Q: 26. Could not found global transaction xid = %s, may be has finished.</h3>
@ -467,7 +484,7 @@ Oracle的NUMBER长度超过19之后用Long的话setObject会查不出数
获取全局锁失败,一般是出现分布式资源竞争导致,请保证你竞争资源的周期是合理的,并且在业务上做好重试。当一个全局事务因为获取锁失败的时候,应该重新完整地从`@Globaltransational`的TM端重新发起。
Seata提供了一个“全局锁重试”功能默认未开启可以通过下面这个配置来开启。
Seata提供了一个“全局锁重试”功能1.5之前的版本中默认在结合@Transactional注解或手动开启本地事务下未开启,可以通过下面这个配置来开启(面临回滚时可能全局锁和本地锁互相争抢导致死锁的可能)建议直接升级1.5及以上版本,不要直接改动这个配置项.
```properties
#遇到全局锁冲突时是否回滚默认为true
client.rm.lock.retryPolicyBranchRollbackOnConflict=false
@ -478,7 +495,7 @@ client.rm.lock.retryPolicyBranchRollbackOnConflict=false
client.rm.lock.retryInterval=10
client.rm.lock.retryTimes=30
```
另外,你也可以直接在`@GlobalTransactional`上单独配置重试逻辑优先级比Seata全局配置更高
另外,你也可以直接在`@GlobalTransactional` 或者 `@GlobalLock`上单独配置重试逻辑优先级比Seata全局配置更高
```java
@GlobalTransactional(lockRetryInternal = 100, lockRetryTimes = 30) // v1.4.2
@GlobalTransactional(lockRetryInterval = 100, lockRetryTimes = 30) // v1.5
@ -492,4 +509,134 @@ client.rm.lock.retryTimes=30
解决办法:
- 编译 seata 源码时确认 JDK 版本为 1.8,以免导致兼容问题
- 如果已经用 JDK 11 编译了 seata 的源码,请删除本地 maven 仓库下 io.seata 路径下所有包。然后重新编译你的项目,让项目重新拉取中央仓库的 seata 的依赖包
- 如果已经用 JDK 11 编译了 seata 的源码,请删除本地 maven 仓库下 io.seata 路径下所有包。然后重新编译你的项目,让项目重新拉取中央仓库的 seata 的依赖包
***
<h3 id='38'>Q38. 为什么在使用Apple的M1芯片下载maven依赖时无法下载依赖`com.google.protobuf:protoc:exe:3.3.0` </h3>
**A:**
在`serializer/seata-serializer-protobuf/pom.xml`文件中,依赖版本是通过识别操作系统变量定义的:`com.google.protobuf:protoc:3.3.0:exe:${os.detected.classifier}`。
在远程仓库中不存在Apple的M1芯片架构对应的依赖版本。
解决方案:
将上述依赖改写为固定版本:`com.google.protobuf:protoc:3.3.0:exe:osx-x86_64`,即可到远程仓库下载对应版本依赖。
***
<h3 id='39'>Q39. 1.4.2及以下版本回滚时抛出Cannot construct instance of `java.time.LocalDateTime` </h3>
**A:**
升级1.5.0及以上版本
**B:**
不要使用mysql driver8.0.x版本
**C:**
引入kryo相关依赖
```java
<dependency>
<groupId>com.esotericsoftware</groupId>
<artifactId>kryo</artifactId>
<version>4.0.2</version>
</dependency>
<dependency>
<groupId>de.javakaffee</groupId>
<artifactId>kryo-serializers</artifactId>
<version>0.42</version>
</dependency>
```
如果配置中心是file,依赖是seata-all,请在应用的file.conf文件中添加如下配置
```java
client {
undo {
logSerialization = "kryo"
}
}
```
如果配置中心是file,依赖是seata-spring-boot-starter,使用yml 自行转成yml格式即可
```
seata.client.undo.logSerialization=kryo
```
如果是第三方配置中心如nacos
请在seata使用的配置相关group,namespace上添加dataid: client.undo.logSerialization,值为kryo
**D**:
修改数据库表中的datetime类型为timestamp
**E:**
参考此[pr](https://github.com/seata/seata/pull/3738)做法,可以用类覆盖或SPI方式扩展新的解析方式处理
****
<h3 id='40'>Q: 40. Seata-Server 使用 DB 作为存储模式时,有哪些注意事项?</h3>
**A:**
- 使用 DB 存储模式时需要注意使用相应seata-server对应版本的建表脚本建表脚本获取地址https://github.com/seata/seata/tree/${版本}/script/server/db例如获取seata-server 1.5.0 对应的建表脚本,可从此地址获取 https://github.com/seata/seata/tree/1.5.0/script/server/db 升级 seata-server 前需要先变更表结构。
- seata-server 依赖的后端的DB不要开启读写分离。开启读写分离后根据同步模式的不同延迟也有所不同seata-server
为无状态计算节点所有状态都需要到DB存储中校验在主从同步延迟较大的情况下会导致读取的状态不准确从而导致事务逻辑处理问题。为了更高的读写性能DB可将隔离级别设置为读已提交。
****
<h3 id='41'>Q: 41. Oracle使用timestamp字段类型回滚失败</h3>
**A:**
- [seata/seata-plugin at develop · seata/seata (github.com)](https://github.com/seata/seata/tree/develop/seata-plugin) 拉取此plugin代码,本地打包自行引入,也可直接拷贝代码进行spi扩展支持
****
<h3 id='42'>Q: 42. 抛出异常后事务未回滚?</h3>
- 检查异常是否被捕获,没有抛至tm端,如rm存在全局异常捕获器,rm将异常包装成了一个正常的result响应给了tm,导致seata的事务拦截器无法发现事务出现了异常,此时自行在代码中根据result中的code之类可判断业务出现异常的返回内容进行抛出异常,或者使用[Seata api](https://seata.io/zh-cn/docs/user/api.html) 进行回滚,切记api回滚必须结束调用,假设tm调用了rm1就出现错误,进行了api回滚,那么不应该让这个调用链再走到rm2去,应该直接return结束方法调用
- 检查是否rm服务抛出异常导致进行了熔断降级处理,如果是请参考方案上述方案进行处理
- 如确认无上述可能,异常明确抛出,请通过相关的xid到tc端和tm和rm检索xid的决议结果和rm注册情况,当rm分支注册时,通过xid可以检索到Register branch successfully, xid = 10.242.2.19:8094:3404997337200687005 , branchId = xxxx的日志,如果没有说明分支没有注册,如是AT或XA模式请检查数据源代理或xid传递问题,如分支已注册,那么检查决议结果,如事务提交,tm端会有类似[10.242.2.19:8094:3404997337200687005] commit status: Committed的日志,如果是回滚那么相关关键字为rollback status: Rollbacked等,如果抛出异常决议缺是commit,那么99%的情况为异常被吞,请仔细检查第一点和第二点的情况,切记不要把日志打印堆栈认为是抛出了异常堆栈!!!!
- 如决议结果是回滚,但是rm没注册,可在rm调用端通过Rootcontext.getXid来判断是否有值,如果无值请参考Q24
- 如何判断数据源是否代理,如果是AT模式请在ConnectionProxy#registry打上断点,看是否会进入,XA模式ConnectionProxyXA#commit 打断点看是否会进入,切记是不回滚的分支!!!
****
<h3 id='43'>Q: 43. 怎么处理@FeignClient注解url不起效提示 Load balancer does not have available server for client的问题</h3>
- 通常Zipkin与Seata整合的时候会出现该问题。
解决办法:
- 若不需要对Feign链路追踪可以通过Spring Cloud Sleuth提供的属性spring.sleuth.feign.enabled=false来使其关闭。
- 若需要同时使用,在启动类加入排除@SpringBootApplication(exclude = {SeataFeignClientAutoConfiguration.class})
再配置Feign的拦截器
```java
@Component
@ConditionalOnClass({RequestInterceptor.class, GlobalTransactional.class})
public class SetSeataInterceptor implements RequestInterceptor {
@Override
public void apply(RequestTemplate template) {
String currentXid = RootContext.getXID();
if (!StringUtils.isEmpty(currentXid)) {
template.header(RootContext.KEY_XID, currentXid);
}
}
}
```
****

View File

@ -1,6 +1,6 @@
# 配置中心
- 什么是配置中心?配置中心可以说是一个"大衣柜",内部放置着各种配置文件,你可以通过自己所需进行获取配置加载到对应的客户端.比如Seata Client端(TM,RM),Seata Server(TC),会去读取全局事务开关,事务会话存储模式等信息.
- 什么是配置中心?配置中心可以说是一个"大货仓",内部放置着各种配置文件,你可以通过自己所需进行获取配置加载到对应的客户端.比如Seata Client端(TM,RM),Seata Server(TC),会去读取全局事务开关,事务会话存储模式等信息.
- Seata的配置中心与Spring cloud的配置中心区别是?在广义上来说,并无区别,只不过Spring cloud的配置中心仅是作用于它们自身的组件,而Seata的配置中心也是一样是作用于Seata自身.(注:Spring cloud的配置中心与Seata无关)
- Seata支持哪些配置中心?
1. nacos

View File

@ -0,0 +1 @@
欢迎认领补充此文档

View File

@ -4,15 +4,18 @@ keywords: Seata
description: Seata 参数配置。
---
# seata参数配置 1.3.0版本
# seata参数配置 1.6.0版本
<a href="./configurations100.html">查看1.0.0版本</a>
<a href="./configurations090.html">查看0.9.0.1之前版本</a>
### 变更记录
```
20201216(1.6.0):
1.4.0到1.6.0版本配置项的变更记录不再集中维护,请根据配置项单独查看相关版本变更情况
20200716(1.3.0):
1.增加了store.redis相关配置
2.增加了nacos注册中心配置group项,Server和Client端的值需一致
3.新增client.rm.sagaBranchRegisterEnable配置项默认false
20200421(1.2.0):
1.增加registry.nacos.application属性默认seata-serverServer和Client端的值需一致
20200220(1.1.0):
@ -20,6 +23,8 @@ description: Seata 参数配置。
2.统一所有配置文件的默认值(file.conf、registry.conf、seata-spring-boot-starter)
3.优化seata-spring-boot-starter中对于事务分组和TC集群的配置
4.移除client.support.spring.datasource.autoproxy,增加@EnableAutoDataSourceProxy
5.新增server.rollbackRetryTimeoutUnlockEnable配置项默认false
6.新增transport.shutdown.wait配置项默认3秒
注解用于开启数据源自动代理,同时可选择代理实现方式(具体请查阅附录5)
20191221:
1.增加seata.enabled、client.report.success.enable、
@ -48,18 +53,29 @@ transport.enable-client-batch-send-request、client.log.exceptionRate
### 公共部分
| key | desc | remark|
|---------------|--------------|----|
| transport.serialization | client和server通信编解码方式 |seata(ByteBuf)、protobuf、kryo、hession、fst默认seata |
| transport.compressor | client和server通信数据压缩方式 |none、gzip默认none |
| key | desc | remark| change record |
|---------------|--------------|----|----------------------------|
| transport.type | socket通信方式 | TCP、UNIX_DOMAIN_SOCKET默认TCP |
| transport.server | socket通道类型 | NIO、NATIVE(根据操作系统类型和socket通信方式选择KQueue或Epoll注意Windows只支持NIO选择这种方式会抛出异常|
| transport.enableTmClientBatchSendRequest | TM批量发送请求消息开关 | 默认false | 1.5.1版本新增 |
| transport.enableRmClientBatchSendRequest | RM批量发送请求消息开关 | 默认true | 1.5.1版本新增 |
| transport.enableTcServerBatchSendResponse | TC批量发送回复消息开关 | 默认false | 1.5.1版本新增 |
| transport.rpcRmRequestTimeout | RM发送请求超时时间 | 默认30秒 | 1.5.1版本新增 |
| transport.rpcTmRequestTimeout | TM发送请求超时时间 | 默认30秒 | 1.5.1版本新增 |
| transport.rpcTcRequestTimeout | TC发送请求超时时间 | 默认30秒 | 1.5.1 版本新增 |
| transport.threadFactory.bossThreadSize | Netty通信模型Boss group线程数 | 默认1 |
| transport.threadFactory.workerThreadSize | Netty通信模型Worker group线程数 | 可配置线程数或选择特定线程工作模式下的线程数线程的默认工作模式有4种:Auto(2\*CPU核数 + 1)、Pin(CPU核数适用于计算密集型任务)、BusyPin(CPU核数 + 1适用于计算密集型且内存比较有限的场景、Default(2\*CPU核数适用于IO密集型任务,默认值为Default模式 |
| transport.shutdown.wait | 服务端Netty线程池关闭前等待服务下线时间 | 默认3秒 |
| transport.serialization | client和server通信编解码方式 |seata(ByteBuf)、protobuf、kryo、hession、fst默认seata |
| transport.compressor | client和server通信数据压缩方式 |none、gzip、zip、sevenz、bzip2、lz4、deflater、zstd默认none | 1.2.0之前gzip <br /> 1.2.0:zip、sevenz、bzip2 <br /> 1.3.0:lz4 <br /> 1.4.1:deflater <br /> 1.5.1:zstd|
| transport.heartbeat | client和server通信心跳检测开关 |默认true开启 |
| registry.type | 注册中心类型 |默认file支持file 、nacos 、eureka、redis、zk、consul、etcd3、sofa、custom |
| config.type | 配置中心类型 |默认file支持file、nacos 、apollo、zk、consul、etcd3、custom |
| registry.type | 注册中心类型 |默认file支持file 、nacos 、redis、eureka、zk、consul、etcd3、sofa、custom | 1.6.0版本Sever端支持可同时注册到多个注册中心,以逗号分隔注册中心名 |
| config.type | 配置中心类型 |默认file支持file、nacos 、apollo、zk、consul、etcd3、springcloud、custom |
### server端
| key| desc | remark|
|-------------------------------------------|---------------------------------|----------------------------|
| key| desc | remark| change record |
|-------------------------------------------|---------------------------------|----------------------------|----------------|
| server.undo.logSaveDays | undo保留天数 |默认7天,log_status=1附录3和未正常清理的undo |
| server.undo.logDeletePeriod | undo清理线程间隔时间 |默认86400000单位毫秒 |
| server.maxCommitRetryTimeout | 二阶段提交重试超时时长 | 单位ms,s,m,h,d,对应毫秒,秒,分,小时,天,默认毫秒。默认值-1表示无限重试。公式: timeout>=now-globalTransactionBeginTime,true表示超时则不再重试(注: 达到超时时间后将不会做任何重试,有数据不一致风险,除非业务自行可校准数据,否者慎用) |
@ -68,9 +84,23 @@ transport.enable-client-batch-send-request、client.log.exceptionRate
| server.recovery.asynCommittingRetryPeriod | 二阶段异步提交状态重试提交线程间隔时间 |默认1000单位毫秒 |
| server.recovery.rollbackingRetryPeriod | 二阶段回滚状态重试回滚线程间隔时间 |默认1000单位毫秒 |
| server.recovery.timeoutRetryPeriod | 超时状态检测重试线程间隔时间 |默认1000单位毫秒检测出超时将全局事务置入回滚会话管理器 |
| store.mode | 事务会话信息存储方式 |file本地文件(不支持HA)db数据库\|redis(支持HA) |
| server.rollbackRetryTimeoutUnlockEnable | 二阶段回滚超时后是否释放锁 | 默认false |
| server.distributedLockExpireTime | Sever端事务管理全局锁超时时间 | 默认10000单位毫秒 | 1.5.1版本新增 |
| server.server.xaerNotaRetryTimeout | 防止XA分支事务悬挂的重试超时时间 | 默认60000单位毫秒 | 1.5.1版本新增 |
| server.session.branchAsyncQueueSize | 分支事务Session异步删除线程池队列大小 | 默认5000 | 1.5.1版本新增 |
| server.session.enableBranchAsyncRemove | 分支事务Session异步删除开关 | 默认false | 1.5.1版本新增 |
| server.enableParallelRequestHandle | 对于批量请求消息的并行处理开关 | 默认false | 1.5.2版本新增 |
| store.mode | 事务会话信息存储方式 |file本地文件(不支持HA)db数据库redis(支持HA) | 1.5.1版本改用lock和session分离存储 |
| store.lock.mode | 事务锁信息存储方式 | file本地文件(不支持HA)db数据库redis(支持HA)配置为空时取store.mode配置项值 | 1.5.1版本新增session和lock可分离存储 |
| store.session.mode | 事务回话信息存储方式 | file本地文件(不支持HA)db数据库redis(支持HA)配置为空时取store.mode配置项值 | 1.5.1版本新增session和lock可分离存储 |
| store.publicKey | db或redis存储密码解密公钥 | | 1.4.2版本支持 |
| store.file.dir | file模式文件存储文件夹名 |默认sessionStore |
| store.db.datasource | db模式数据源类型 |dbcp、druid、hikari无默认值store.mode=db时必须指定。 |
| store.file.maxBranchSessionSize | file模式文件存储分支session最大字节数 | 默认16384(16kb),单位byte |
| store.file.maxGlobalSessionSize | file模式文件存储全局session最大字节数 | 默认512b单位byte |
| store.file.fileWriteBufferCacheSize | file模式文件存储buffer最大缓存大小 | 默认16384(16kb)单位byte,写入session等数据量大于该值时会抛出异常 |
| store.file.flushDiskMode | file模式文件存储刷盘策略 | 默认async可选sync |
| store.file.sessionReloadReadSize | file模式文件存储Server节点重启后从备份文件中恢复的session或lock key上限个数 | 默认100 |
| store.db.datasource | db模式数据源类型 |dbcp、druid、hikari无默认值store.mode=db时必须指定 |
| store.db.dbType | db模式数据库类型 |mysql、oracle、db2、sqlserver、sybaee、h2、sqlite、access、postgresql、oceanbase无默认值store.mode=db时必须指定。 |
| store.db.driverClassName | db模式数据库驱动 |store.mode=db时必须指定 |
| store.db.url | db模式数据库url | store.mode=db时必须指定在使用mysql作为数据源时建议在连接参数中加上`rewriteBatchedStatements=true`(详细原因请阅读附录7) |
@ -83,8 +113,14 @@ transport.enable-client-batch-send-request、client.log.exceptionRate
| store.db.branchTable | db模式分支事务表名 |默认branch_table |
| store.db.lockTable | db模式全局锁表名 |默认lock_table |
| store.db.queryLimit | db模式查询全局事务一次的最大条数 |默认100 |
| store.redis.host | redis模式ip |默认127.0.0.1 |
| store.redis.port | redis模式端口 |默认6379 |
| store.db.distributedLockTable | db模式Sever端事务管理全局锁存储表名 | 默认distributed_lock多Sever集群下保证同时只有一个Sever处理提交或回滚 | 1.5.1版本新增|
| store.redis.mode | redis模式 | 默认single,可选sentinel| 1.4.2版本新增sentinel模式 |
| store.redis.single.host | 单机模式下redis的host,兼容1.4.2之前的版本该配置为空时选取store.redis.host作为配置项 | 1.4.2版本新增 |
| store.redis.single.port | 单机模式下redis的port,兼容1.4.2之前的版本该配置为空时选取store.redis.port作为配置项 | 1.4.2版本新增 |
| store.redis.sentinel.masterName | sentinel模式下redis的主库名称| | 1.4.2版本新增 |
| store.redis.sentinel.sentinelHosts | sentinel模式下sentinel的hosts|多hosts以逗号分隔| 1.4.2版本新增 |
| store.redis.host | redis模式ip |默认127.0.0.1 | 1.4.2版本弃用 |
| store.redis.port | redis模式端口 |默认6379 | 1.4.2版本弃用 |
| store.redis.maxConn | redis模式最大连接数 |默认10 |
| store.redis.minConn | redis模式最小连接数 |默认1 |
| store.redis.database | redis模式默认库 |默认0 |
@ -97,8 +133,8 @@ transport.enable-client-batch-send-request、client.log.exceptionRate
### client端
| key| desc | remark|
|-------------------------------------------|----------------------------|----------------------------|
| key| desc | remark| change record |
|-------------------------------------------|----------------------------|----------------------------|----------------|
| seata.enabled | 是否开启spring-boot自动装配 |true、false,(SSBS)专有配置默认true附录4 |
| seata.enableAutoDataSourceProxy=true | 是否开启数据源自动代理 | true、false,seata-spring-boot-starter(SSBS)专有配置,SSBS默认会开启数据源自动代理,可通过该配置项关闭.|
| seata.useJdkProxy=false | 是否使用JDK代理作为数据源自动代理的实现方式| true、false,(SSBS)专有配置,默认false,采用CGLIB作为数据源自动代理的实现方式 |
@ -115,13 +151,23 @@ transport.enable-client-batch-send-request、client.log.exceptionRate
| client.rm.lock.retryInterval | 校验或占用全局锁重试间隔 | 默认10单位毫秒 |
| client.rm.lock.retryTimes | 校验或占用全局锁重试次数 | 默认30 |
| client.rm.lock.retryPolicyBranchRollbackOnConflict | 分支事务与其它全局回滚事务冲突时锁策略 | 默认true优先释放本地锁让回滚成功 |
| client.rm.reportRetryCount | 一阶段结果上报TC重试次数 | 默认5次 |
| client.rm.tableMetaCheckEnable | 自动刷新缓存中的表结构 | 默认false |
| client.rm.reportRetryCount | 一阶段结果上报TC重试次数 | 默认5次 | 1.4.1版本新增 |
| client.rm.tableMetaCheckEnable | 自动刷新缓存中的表结构 | 默认false | 1.5.1版本新增 |
| client.rm.tableMetaCheckerInterval | 定时刷新缓存中表结构间隔时间 | 默认60秒 |
| client.rm.sagaBranchRegisterEnable | 是否开启saga分支注册 | Saga模式中分支状态存储在状态机本地数据库中可通过状态机进行提交或回滚为提高性能可考虑不用向TC注册Saga分支但需考虑状态机的可用性默认false |
| client.rm.sagaJsonParser | saga模式中数据序列化方式 | 默认fastjson,可选jackson | 1.5.1版本新增 |
| client.rm.tccActionInterceptorOrder | tcc拦截器顺序 | 默认Ordered.HIGHEST_PRECEDENCE + 1000保证拦截器在本地事务拦截器之前执行也可自定义tcc和业务开发的拦截器执行顺序 | 1.5.1版本新增 |
| client.tm.commitRetryCount | 一阶段全局提交结果上报TC重试次数 | 默认1次建议大于1 |
| client.tm.rollbackRetryCount | 一阶段全局回滚结果上报TC重试次数 | 默认1次建议大于1 |
| client.tm.defaultGlobalTransactionTimeout | 全局事务超时时间 | 默认60秒TM检测到分支事务超时或TC检测到TM未做二阶段上报超时后发起对分支事务的回滚 | 1.4.0版本新增 |
| client.tm.interceptorOrder | TM全局事务拦截器顺序 | 默认Ordered.HIGHEST_PRECEDENCE + 1000保证拦截器在本地事务拦截器之前执行也可自定义全局事务和业务开发的拦截器执行顺序 | 1.5.1版本新增 |
| client.undo.dataValidation | 二阶段回滚镜像校验 | 默认true开启false关闭 |
| client.undo.logSerialization | undo序列化方式 | 默认jackson |
| client.undo.logTable | 自定义undo表名 | 默认undo_log |
| client.undo.onlyCareUpdateColumns | 只生成被更新列的镜像 | 默认true |
| client.undo.compress.enable | undo log压缩开关 | 默认true | 1.4.1版本新增 |
| client.undo.compress.type | undo log压缩算法 | 默认zip,可选NONE(不压缩)、GZIP、ZIP、SEVENZ、BZIP2、LZ4、DEFLATER、ZSTD | 1.4.1版本新增 |
| client.undo.compress.threshold | undo log压缩阈值 | 默认值64k压缩开关开启且undo log大小超过阈值时才进行压缩 | 1.4.1版本新增 |
| client.rm.sqlParserType | sql解析类型 | 默认druid,可选antlr |

View File

@ -12,6 +12,8 @@ description: Seata 参数配置 0.9.0版本。
|---------------|--------------|----|
| transport.serialization | client和server通信编解码方式 |seata、protobuf |
| transport.heartbeat | client和server通信心跳检测开关 |默认true开启 |
| registry.type | 注册中心类型 |默认file支持file 、nacos 、redis、eureka、zk、consul、etcd3、sofa、custom | 1.6.0版本Sever端支持可同时注册到多个注册中心,以逗号分隔 |
| config.type | 配置中心类型 |默认file支持file、nacos 、apollo、zk、consul、etcd3、springcloud、custom |
### server端
@ -28,6 +30,11 @@ description: Seata 参数配置 0.9.0版本。
| recovery.timeout-retry-period | 超时状态检测重试线程间隔时间 |默认1000单位毫秒检测出超时将全局事务置入回滚会话管理器 |
| store.mode |事务会话信息存储方式 |file本地文件(不支持HA)db数据库(支持HA) |
| store.file.dir |file模式文件存储文件夹名 |默认sessionStore |
| store.file.maxBranchSessionSize | file模式文件存储分支session最大字节数 | 默认16384(16kb),单位byte |
| store.file.maxGlobalSessionSize | file模式文件存储全局session最大字节数 | 默认512b单位byte |
| store.file.fileWriteBufferCacheSize | file模式文件存储buffer最大缓存大小 | 默认16384(16kb)单位byte,写入session等数据量大于该值时会抛出异常 |
| store.file.flushDiskMode | file模式文件存储刷盘策略 | 默认async可选sync |
| store.file.sessionReloadReadSize | file模式文件存储Server节点重启后从备份文件中恢复的session或lock key上限个数 | 默认100 |
| store.db.datasource |db模式数据源类型 |默认dbcp |
| store.db.db-type |db模式数据库类型 |默认mysql |
| store.db.driver-class-name |db模式数据库驱动 |默认com.mysql.jdbc.Driver |

View File

@ -3,8 +3,8 @@ title: Seata 微服务框架支持
keywords: Seata
description: Seata 微服务框架支持。
---
# 事务上下文
# 微服务框架支持
## 事务上下文
Seata 的事务上下文由 RootContext 来管理。
@ -32,7 +32,7 @@ String xid = RootContext.getXID();
}
```
# 事务传播
## 事务传播
Seata 全局事务的传播机制就是指事务上下文的传播,根本上,就是 XID 的应用运行时的传播方式。
@ -91,7 +91,7 @@ RootContext.bind(xid);
只要能做到这点,理论上 Seata 可以支持任意的微服务框架。
# 对 Dubbo 支持的解读
## 对 Dubbo 支持的解读
下面,我们通过内置的对 Dubbo RPC 支持机制的解读,来说明 Seata 在实现对一个特定微服务框架支持的机制。

View File

@ -5,4 +5,83 @@ description: Seata Spring支持。
---
# Spring支持
TBD
## 注解拦截
### 全局事务
```java
@GetMapping(value = "testCommit")
@GlobalTransactional
public Object testCommit(@RequestParam(name = "id",defaultValue = "1") Integer id,
@RequestParam(name = "sum", defaultValue = "1") Integer sum) {
Boolean ok = productService.reduceStock(id, sum);
if (ok) {
LocalDateTime now = LocalDateTime.now();
Orders orders = new Orders();
orders.setCreateTime(now);
orders.setProductId(id);
orders.setReplaceTime(now);
orders.setSum(sum);
orderService.save(orders);
return "ok";
} else {
return "fail";
}
}
```
### TCC
```java
/**
* 定义两阶段提交 name = 该tcc的bean名称,全局唯一 commitMethod = commit 为二阶段确认方法 rollbackMethod = rollback 为二阶段取消方法
* useTCCFence=true 为开启防悬挂
* BusinessActionContextParameter注解 传递参数到二阶段中
*
* @param params -入参
* @return String
*/
@TwoPhaseBusinessAction(name = "beanName", commitMethod = "commit", rollbackMethod = "rollback", useTCCFence = true)
public void insert(@BusinessActionContextParameter(paramName = "params") Map<String, String> params) {
logger.info("此处可以预留资源,或者利用tcc的特点,与AT混用,二阶段时利用一阶段在此处存放的消息,通过二阶段发出,比如redis,mq等操作");
}
/**
* 确认方法、可以另命名但要保证与commitMethod一致 context可以传递try方法的参数
*
* @param context 上下文
* @return boolean
*/
public void commit(BusinessActionContext context) {
logger.info("预留资源真正处理,或者发出mq消息和redis入库");
}
/**
* 二阶段取消方法
*
* @param context 上下文
* @return boolean
*/
public void rollback(BusinessActionContext context) {
logger.info("预留资源释放,或清除一阶段准备让二阶段提交时发出的消息缓存");
}
```
## 切点表达式
### 全局事务
```java
@Bean
public AspectTransactionalInterceptor aspectTransactionalInterceptor () {
return new AspectTransactionalInterceptor();
}
@Bean
public Advisor txAdviceAdvisor(AspectTransactionalInterceptor aspectTransactionalInterceptor ) {
AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();
pointcut.setExpression("配置切点表达式使全局事务拦截器生效");
return new DefaultPointcutAdvisor(pointcut, aspectTransactionalInterceptor);
}
```

View File

@ -8,11 +8,12 @@ description: Seata DML语句
本文介绍 DML 语句类型、SQL 实例以及 Seata 是否支持,帮助您在 Seata 更顺畅的使用 SQL。
| 类型 | SQL 实例 | 是否支持 |
| 类型&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | SQL 实例 | 是否支持&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |
| :------- | :----------------------------------------------------------- | :------- |
| INSERT | `INSERT INTO tb1_name (col_name,...) VALUES ({expr | FAULT},...),(...),...` `INSERT INTO tb1_name SET col_name={expr | DEFAULT}, ...`或`INSERT INTO tb1_name (col_name,...) VALUES ({expr | FAULT},...) ON DUPLICATE KEY UPDATE field1=value1,...;` | 是 |
| UPDATE | `UPDATE tb1_nameSET col_name1=expr1 [, col_name2=expr2 ...][WHERE where_definition]` | 是 |
| INSERT | `INSERT INTO tb1_name (col_name,...) VALUES ({expr \| FAULT},...),(...),...`或 `INSERT INTO tb1_name SET col_name={expr \| DEFAULT}, ...` 或`INSERT INTO tb1_name (col_name,...) VALUES ({expr \| FAULT},...) ON DUPLICATE KEY UPDATE field1=value1,...;` | 是 |
| UPDATE | `UPDATE tb1_name SET col_name1=expr1 [, col_name2=expr2 ...][WHERE where_definition]` | 是 |
| DELETE | `DELETE FROM tb1_name [WHERE where_definition]` | 是 |
| SELECT | `SELECT [ALL | DISTINCT | DISTINCTROW ]select_expr, ... FROM tb1_name[WHERE where_definition]` | 是 |
| REPLACE | `REPLACE [LOW_PRIORITY | DELAYED][INTO] tb1_name [(col_name,...)]VALUES ({expr | DEFAULT},...),(...),...`或`REPLACE [LOW_PRIORITY | DELAYED][INTO] tb1_nameSET col_name={expr | DEFAULT}, ...` | 否 |
| TRUNCATE | `TRUNCATE [TABLE] tb1_name` | 否 |
| SELECT | `SELECT [ALL \| DISTINCT \| DISTINCTROW ]select_expr, ... FROM tb1_name[WHERE where_definition]` | 是 |
| REPLACE | `REPLACE [LOW_PRIORITY \| DELAYED][INTO] tb1_name [(col_name,...)]VALUES ({expr \| DEFAULT},...),(...),...`或`REPLACE [LOW_PRIORITY \| DELAYED][INTO] tb1_nameSET col_name={expr \| DEFAULT}, ...` | 否 |
| TRUNCATE | `TRUNCATE [TABLE] tb1_name` | 否 |
| UPDATE JOIN | `UPDATE tb1_name tb1 JOIN tb2_name tb2 ON tb2.col_name=tb1.col_name SET tb1.col_name1=expr1 [, tb1.col_name2=expr2 ...][ [WHERE where_definition]` | 是 since 1.6.0 |

View File

@ -11,6 +11,22 @@ Seata 事务目前支持 INSERT、UPDATE、DELETE 三类 DML 语法的部分功
### 使用限制
- 不支持 SQL 嵌套
- 不支持多表复杂 SQL
- 不支持多表复杂 SQL(自1.6.0版本MySQL支持UPDATE JOIN语句<a href="./dml.md">详情请看</a> )
- 不支持存储过程、触发器
- 不支持批量更新 SQL
- 部分数据库不支持批量更新,在使用 MySQL、Mariadb、PostgreSQL9.6+作为数据库时支持批量,批量更新方式如下以 Java 为例
```
// use JdbcTemplate
public void batchUpdate() {
jdbcTemplate.batchUpdate(
"update storage_tbl set count = count -1 where id = 1",
"update storage_tbl set count = count -1 where id = 2"
);
}
// use Statement
public void batchUpdateTwo() {
statement.addBatch("update storage_tbl set count = count -1 where id = 1");
statement.addBatch("update storage_tbl set count = count -1 where id = 2");
statement.executeBatch();
}
```

View File

@ -21,7 +21,7 @@ seata.tx-service-group=projectA
seata.service.vgroup-mapping.projectA=Guangzhou
```
![](https://gitee.com/tanzjz/pic/raw/master/txgroup-normal.png)
![异地多机房容灾正常图](/img/txgroup/txgroup-normal.png)
假如此时guangzhou集群分组整个down掉或者因为网络原因projectA暂时无法与Guangzhou机房通讯那么我们将配置中心中的Guangzhou集群分组改为Shanghai如下
@ -31,7 +31,7 @@ seata.service.vgroup-mapping.projectA=Shanghai
并推送到各个微服务便完成了对整个projectA项目的TC集群动态切换。
![异地多机房容灾备用集群](https://gitee.com/tanzjz/pic/raw/master/txgroup-switch-to-sh.png)
![异地多机房容灾备用集群](/img/txgroup/txgroup-switch-to-sh.png)
## 最佳实践2单一环境多应用接入
@ -70,7 +70,7 @@ seata.service.vgroup-mapping.projectA=project-a-group
完成配置启动后对应事务分组的TC单独为其应用服务整体部署图如下
![单环境多应用接入](https://gitee.com/tanzjz/pic/raw/master/txgroup-multipart-application.png)
![单环境多应用接入](/img/txgroup/txgroup-multiApplication.png)
## 最佳实践3client的精细化控制
@ -81,7 +81,7 @@ seata.service.vgroup-mapping.projectA=project-a-group
那么此时我们可以将ServiceD微服务引流到Shanghai集群中去将高性能的服务器让给其余流量较大的微服务反之亦然若存在某一个微服务流量特别大我们也可以单独为此微服务开辟一个更高性能的集群并将该client的virtual group指向该集群其最终目的都是保证在流量洪峰时服务的可用
![client精细化控制](https://gitee.com/tanzjz/pic/raw/master/txgroup-client-controll.png)
![client精细化控制](/img/txgroup/txgroup-client-controll.png)
## 最佳实践4Seata的预发与生产隔离
@ -136,6 +136,6 @@ registry {
其部署图如下所示:
![预发生产隔离](https://gitee.com/tanzjz/pic/raw/master/txgroup-segregation-of-pre-and-product.png)
![预发生产隔离](/img/txgroup/txgroup-segregation-of-pre-and-product.png)
不仅如此,你还可以将以上四个最佳实践依据你的实际生产情况组合搭配使用。

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
img/blog/fence-same-db.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

BIN
img/blog/fence-suspend.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
img/blog/seata2023-4.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
img/blog/summer2023-1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 692 KiB

BIN
img/blog/summer2023-2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 KiB

BIN
img/blog/summer2023-3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

BIN
img/blog/summer2023-4.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8">
</head>
<body>
<script src="//cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/js-cookie/3.0.1/js.cookie.min.js"></script>
<script>
window.rootPath = '<%= rootPath %>';
window.defaultLanguage = '<%= defaultLanguage %>';
@ -12,7 +12,7 @@
if (!lang) {
lang = '<%= defaultLanguage %>';
}
window.location = window.rootPath + '/' + lang;
window.location = window.rootPath + '/' + lang + '/index.html';
</script>
</body>
</html>

43
robots.txt Normal file
View File

@ -0,0 +1,43 @@
User-agent: Googlebot
Disallow:
User-agent: googlebot-image
Disallow:
User-agent: googlebot-mobile
Disallow:
User-agent: MSNBot
Disallow:
User-agent: Slurp
Disallow:
User-agent: Teoma
Disallow:
User-agent: twiceler
Disallow:
User-agent: Gigabot
Disallow:
User-agent: Scrubby
Disallow:
User-agent: Robozilla
Disallow:
User-agent: Nutch
Disallow:
User-agent: ia_archiver
Disallow:
User-agent: baiduspider
Disallow:
User-agent: naverbot
Disallow:
User-agent: yeti
Disallow:
User-agent: yahoo-mmcrawler
Disallow:
User-agent: psbot
Disallow:
User-agent: asterias
Disallow:
User-agent: yahoo-blogs/v3.9
Disallow:
User-agent: *
Disallow:
Disallow: /cgi-bin/
Disallow: /bin/
Sitemap: https://seata.io/sitemap.xml

25
s.yaml Normal file
View File

@ -0,0 +1,25 @@
edition: 1.0.0
name: deploy-oss
access: seata
vars:
region: cn-hongkong
oss:
bucketName: 'seata-website-cn-hongkong'
services:
portal-www: # 静态资源
component: oss
actions:
post-deploy:
- plugin: cdn-cache-plugin
args:
operateType: refresh
objectPath: https://seata.io/
props:
region: ${vars.region}
bucket: ${vars.oss.bucketName} # OSS bucket 自动生成
acl: public-read # 读写权限
codeUri: ./deploy-dist # 指定本地要上传目录文件地址
website: # OSS 静态网站配置
index: index.html # 默认首页
error: 404.html # 默认 404 页
subDirType: redirect # 子目录首页 404 规则

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"version":3,"file":"bundle.js","sources":["webpack:///bundle.js"],"mappings":"AAAA;;;;;;AA44FA;;;;;;AAw9RA;;;;;;AA07tBA;;;;;AA6zUA;;;;;AAyiGA","sourceRoot":""}
{"version":3,"file":"bundle.js","sources":["webpack:///bundle.js"],"mappings":"AAAA;;;;;;AAgsIA;;;;;;AAw9RA;;;;;;AAigmBA;;;;;;AAMA;;;;;;AAMA;;;;;AAktIA;;;;;AAwkGA","sourceRoot":""}

View File

@ -1,30 +1,55 @@
https://seata.io/zh-cn/
https://seata.io/zh-cn/index.html
https://seata.io/zh-cn/docs/overview/what-is-seata.html
https://seata.io/zh-cn/docs/developers/developers_dev.html
https://seata.io/zh-cn/blog/index.html
https://seata.io/zh-cn/community/index.html
https://seata.io/zh-cn/blog/download.html
https://seata.io/en-us/
https://seata.io/en-us/index.html
https://seata.io/zh-cn/docs/user/quickstart.html
https://seata.io/zh-cn/docs/overview/terminology.html
https://seata.io/zh-cn/docs/overview/faq.html
https://seata.io/zh-cn/docs/user/quickstart.html
https://seata.io/zh-cn/docs/user/saga.html
https://seata.io/zh-cn/docs/user/configurations.html
https://seata.io/zh-cn/docs/user/configurations090.html
https://seata.io/zh-cn/docs/user/txgroup/transaction-group.html
https://seata.io/zh-cn/docs/user/txgroup/transaction-group-and-ha.html
https://seata.io/zh-cn/docs/user/appendix/global-transaction-status.html
https://seata.io/zh-cn/docs/user/spring.html
https://seata.io/zh-cn/docs/user/configuration/index.html
https://seata.io/zh-cn/docs/user/configuration/nacos.html
https://seata.io/zh-cn/docs/user/configuration/apollo.html
https://seata.io/zh-cn/docs/user/configuration/etcd3.html
https://seata.io/zh-cn/docs/user/configuration/consul.html
https://seata.io/zh-cn/docs/user/registry/index.html
https://seata.io/zh-cn/docs/user/registry/nacos.html
https://seata.io/zh-cn/docs/user/registry/eureka.html
https://seata.io/zh-cn/docs/user/registry/etcd3.html
https://seata.io/zh-cn/docs/user/registry/consul.html
https://seata.io/zh-cn/docs/user/registry/zookeeper.html
https://seata.io/zh-cn/docs/user/api.html
https://seata.io/zh-cn/docs/user/microservice.html
https://seata.io/zh-cn/docs/user/ormframework.html
https://seata.io/zh-cn/docs/user/datasource.html
https://seata.io/zh-cn/docs/user/sqlreference/sql-restrictions.html
https://seata.io/zh-cn/docs/user/sqlreference/dml.html
https://seata.io/zh-cn/docs/user/sqlreference/sql-decoration.html
https://seata.io/zh-cn/docs/user/sqlreference/function.html
https://seata.io/zh-cn/docs/user/apm/skywalking.html
https://seata.io/zh-cn/docs/user/apm/prometheus.html
https://seata.io/zh-cn/docs/user/performance.html
https://seata.io/zh-cn/docs/user/appendix/global-transaction-status.html
https://seata.io/zh-cn/docs/user/appendix/isolation.html
https://seata.io/zh-cn/docs/dev/mode/at-mode.html
https://seata.io/zh-cn/docs/dev/mode/tcc-mode.html
https://seata.io/zh-cn/docs/dev/mode/saga-mode.html
https://seata.io/zh-cn/docs/user/saga.html
https://seata.io/zh-cn/docs/dev/mode/xa-mode.html
https://seata.io/zh-cn/docs/dev/seata-mertics.html
https://seata.io/zh-cn/docs/ops/operation.html
https://seata.io/zh-cn/docs/ops/upgrade.html
https://seata.io/zh-cn/docs/ops/deploy-guide-beginner.html
https://seata.io/zh-cn/docs/ops/deploy-server.html
https://seata.io/zh-cn/docs/ops/deploy-by-docker.html
https://seata.io/zh-cn/docs/ops/deploy-by-docker-compose.html
https://seata.io/zh-cn/docs/ops/deploy-by-kubernetes.html
https://seata.io/zh-cn/docs/ops/deploy-by-helm.html
https://seata.io/zh-cn/docs/developers/developers_dev.html
https://seata.io/zh-cn/docs/ops/deploy-ha.html
https://seata.io/zh-cn/docs/developers/contributor-guide/new-contributor-guide_dev.html
https://seata.io/zh-cn/docs/developers/contributor-guide/test-coverage-guide_dev.html
https://seata.io/zh-cn/docs/developers/contributor-guide/reporting-security-issues_dev.html
@ -32,7 +57,28 @@ https://seata.io/zh-cn/docs/developers/guide_dev.html
https://seata.io/zh-cn/docs/developers/committer-guide/label-an-issue-guide_dev.html
https://seata.io/zh-cn/docs/developers/committer-guide/website-guide_dev.html
https://seata.io/zh-cn/docs/developers/committer-guide/release-guide_dev.html
https://seata.io/zh-cn/community/index.html
https://seata.io/zh-cn/docs/developers/contributor-activity/top-contributer_dev.html
https://seata.io/zh-cn/blog/seata-1.6.0.html
https://seata.io/zh-cn/blog/seata-1.5.2.html
https://seata.io/zh-cn/blog/seata-tcc-fence.html
https://seata.io/zh-cn/blog/seata-tcc.html
https://seata.io/zh-cn/blog/seata-at-lock.html
https://seata.io/zh-cn/blog/seata-snowflake-explain.html
https://seata.io/zh-cn/blog/seata-analysis-UUID-generator.html
https://seata.io/zh-cn/blog/seata-feature-undo-log-compress.html
https://seata.io/zh-cn/blog/seata-dsproxy-deadlock.html
https://seata.io/zh-cn/blog/seata-client-start-analysis-02.html
https://seata.io/zh-cn/blog/seata-client-start-analysis-01.html
https://seata.io/zh-cn/blog/integrate-seata-tcc-mode-with-spring-cloud.html
https://seata.io/zh-cn/blog/seata-config-manager.html
https://seata.io/zh-cn/blog/seata-golang-communication-mode.html
https://seata.io/zh-cn/blog/seata-datasource-proxy.html
https://seata.io/zh-cn/blog/seata-sourcecode-client-bootstrap.html
https://seata.io/zh-cn/blog/seata-at-demo-in-mac.html
https://seata.io/zh-cn/blog/seata-rpc-refactor.html
https://seata.io/zh-cn/blog/seata-sourcecode-server-bootstrap.html
https://seata.io/zh-cn/blog/seata-xa-introduce.html
https://seata.io/zh-cn/blog/seata-quick-start.html
https://seata.io/zh-cn/blog/seata-analysis-config-modular.html
https://seata.io/zh-cn/blog/seata-analysis-dubbo-transmit-xid.html
https://seata.io/zh-cn/blog/seata-analysis-tcc-modular.html
@ -54,39 +100,39 @@ https://seata.io/zh-cn/blog/how-to-support-spring-cloud.html
https://seata.io/zh-cn/blog/integrate-seata-with-spring-cloud.html
https://seata.io/zh-cn/blog/seata-analysis-java-server.html
https://seata.io/zh-cn/blog/tcc-mode-applicable-scenario-analysis.html
https://seata.io/zh-cn/blog/seata-meetup-hangzhou.html
https://seata.io/zh-cn/blog/tcc-mode-design-principle.html
https://seata.io/zh-cn/blog/quick-start-use-seata-and-dubbo-services.html
https://seata.io/zh-cn/blog/seata-analysis-simple.html
https://seata.io/zh-cn/blog/manual-transaction-mode.html
https://seata.io/zh-cn/blog/seata-community-meetup-hangzhou-ready.html
https://seata.io/zh-cn/blog/seata-meetup-hangzhou.html
https://seata.io/zh-cn/blog/seata-community-meetup-hangzhou-ready.html
https://seata.io/zh-cn/blog/download.html
https://seata.io/en-us/
https://seata.io/en-us/docs/overview/what-is-seata.html
https://seata.io/en-us/docs/developers/developers_dev.html
https://seata.io/en-us/blog/index.html
https://seata.io/en-us/community/index.html
https://seata.io/en-us/blog/download.html
https://seata.io/en-us/docs/user/quickstart.html
https://seata.io/zh-cn/docs/user/configurations100.html
https://seata.io/zh-cn/docs/user/configurations090.html
https://seata.io/zh-cn/docs/ops/deploy-by-docker-142.html
https://seata.io/zh-cn/docs/ops/deploy-by-docker-compose-142.html
https://seata.io/zh-cn/docs/dev/mode/saga-mode.html
https://seata.io/en-us/docs/overview/terminology.html
https://seata.io/en-us/docs/overview/faq.html
https://seata.io/en-us/docs/user/quickstart.html
https://seata.io/en-us/docs/user/saga.html
https://seata.io/en-us/docs/user/configurations.html
https://seata.io/en-us/docs/user/configurations090.html
https://seata.io/en-us/docs/user/transaction-group.html
https://seata.io/en-us/docs/user/spring.html
https://seata.io/en-us/docs/user/api.html
https://seata.io/en-us/docs/user/microservice.html
https://seata.io/en-us/docs/user/ormframework.html
https://seata.io/en-us/docs/user/datasource.html
https://seata.io/en-us/docs/user/sqlreference/sql-restrictions.html
https://seata.io/en-us/docs/user/sqlreference/dml.html
https://seata.io/en-us/docs/dev/mode/at-mode.html
https://seata.io/en-us/docs/dev/mode/tcc-mode.html
https://seata.io/en-us/docs/dev/mode/saga-mode.html
https://seata.io/en-us/docs/dev/seata-mertics.html
https://seata.io/en-us/docs/ops/operation.html
https://seata.io/en-us/docs/ops/deploy-guide-beginner.html
https://seata.io/en-us/docs/ops/multi-configuration-isolation.html
https://seata.io/en-us/docs/ops/deploy-server.html
https://seata.io/en-us/docs/ops/deploy-by-docker.html
https://seata.io/en-us/docs/ops/deploy-by-kubernetes.html
https://seata.io/en-us/docs/ops/deploy-by-helm.html
https://seata.io/en-us/docs/developers/developers_dev.html
https://seata.io/en-us/docs/ops/deploy-ha.html
https://seata.io/en-us/docs/developers/contributor-guide/new-contributor-guide_dev.html
https://seata.io/en-us/docs/developers/contributor-guide/test-coverage-guide_dev.html
https://seata.io/en-us/docs/developers/contributor-guide/reporting-security-issues_dev.html
@ -94,5 +140,6 @@ https://seata.io/en-us/docs/developers/guide_dev.html
https://seata.io/en-us/docs/developers/committer-guide/label-an-issue-guide_dev.html
https://seata.io/en-us/docs/developers/committer-guide/website-guide_dev.html
https://seata.io/en-us/docs/developers/committer-guide/release-guide_dev.html
https://seata.io/en-us/community/index.html
https://seata.io/en-us/blog/download.html
https://seata.io/en-us/blog/quick-start-use-seata-and-dubbo-services.html
https://seata.io/en-us/blog/manual-transaction-mode.html
https://seata.io/zh-cn/blog/seata-ha-practice.html

View File

@ -170,6 +170,20 @@
desc: '回答读者关于Seata的新版雪花算法的疑虑并结合实践分析算法的优劣',
link: '/zh-cn/blog/seata-snowflake-explain.html',
},
{
title: 'Seata 1.5.2 重磅发布支持xid负载均衡',
author: '@Seata社区',
dateStr: 'Jul 12th, 2022',
desc: 'Seata 1.5.2 重磅发布支持xid负载均衡',
link: '/zh-cn/blog/seata-1.5.2.html',
},
{
title: 'Seata 1.6.0 重磅发布,大幅提升性能',
author: '@Seata社区',
dateStr: 'Dec 17th, 2023',
desc: 'Seata 1.6.0 重磅发布,大幅提升性能',
link: '/zh-cn/blog/seata-1.6.0.html',
},
]
},
};

View File

@ -36,10 +36,15 @@ export default {
title: 'Wechat group assistant',
},
{
img: '//img.alicdn.com/imgextra/i1/O1CN01TlIbgM1JSrtYmHNIw_!!6000000001028-0-tps-458-456.jpg',
imgHover: '//img.alicdn.com/imgextra/i1/O1CN01TlIbgM1JSrtYmHNIw_!!6000000001028-0-tps-458-456.jpg',
img: '//img.alicdn.com/imgextra/i4/O1CN01BQvTuX1O8KHxfi2Ye_!!6000000001660-0-tps-312-304.jpg',
imgHover: '//img.alicdn.com/imgextra/i4/O1CN01BQvTuX1O8KHxfi2Ye_!!6000000001660-0-tps-312-304.jpg',
title: 'dingTalk③(Recommend)',
}
},
{
img: '//img.alicdn.com/imgextra/i2/O1CN014QxxzN1GH0sOVYTgf_!!6000000000596-0-tps-300-302.jpg',
imgHover: '//img.alicdn.com/imgextra/i2/O1CN014QxxzN1GH0sOVYTgf_!!6000000000596-0-tps-300-302.jpg',
title: 'QQ group③',
},
],
},
contributorGuide: {
@ -111,10 +116,15 @@ export default {
title: '微信群拉取小助手',
},
{
img: '//img.alicdn.com/imgextra/i1/O1CN01TlIbgM1JSrtYmHNIw_!!6000000001028-0-tps-458-456.jpg',
imgHover: '//img.alicdn.com/imgextra/i1/O1CN01TlIbgM1JSrtYmHNIw_!!6000000001028-0-tps-458-456.jpg',
img: '//img.alicdn.com/imgextra/i4/O1CN01BQvTuX1O8KHxfi2Ye_!!6000000001660-0-tps-312-304.jpg',
imgHover: '//img.alicdn.com/imgextra/i4/O1CN01BQvTuX1O8KHxfi2Ye_!!6000000001660-0-tps-312-304.jpg',
title: '钉钉③群(推荐)',
},
{
img: '//img.alicdn.com/imgextra/i2/O1CN014QxxzN1GH0sOVYTgf_!!6000000000596-0-tps-300-302.jpg',
imgHover: '//img.alicdn.com/imgextra/i2/O1CN014QxxzN1GH0sOVYTgf_!!6000000000596-0-tps-300-302.jpg',
title: 'QQ③群',
},
],
},
contributorGuide: {

View File

@ -33,7 +33,20 @@ export default {
{
title: 'Microservices Framework Supports',
link: '/en-us/docs/user/microservice.html',
}
},
{
title: 'SQL Reference',
children: [
{
title: 'SQL Restrictions.',
link: '/en-us/docs/user/sqlreference/sql-restrictions.html',
},
{
title: 'DML',
link: '/en-us/docs/user/sqlreference/dml.html',
},
]
},
],
},
{
@ -300,6 +313,27 @@ export default {
}
],
},
{
title: '领域模型',
children: [
{
title: '领域模型概述',
link: '/zh-cn/docs/dev/domain/overviewDomainModel.html',
},
{
title: '事务管理者(TM)',
link: '/zh-cn/docs/dev/domain/tm.html',
},
{
title: '资源管理者(RM)',
link: '/zh-cn/docs/dev/domain/rm.html',
},
{
title: '事务协调者(TC)',
link: '/zh-cn/docs/dev/domain/tc.html',
}
],
},
{
title: 'Metrics设计',
link: '/zh-cn/docs/dev/seata-mertics.html',

View File

@ -26,30 +26,38 @@ export default {
link: 'https://github.com/opentrx/seata-golang',
type: 'normal',
},
{
text: 'Github-Python',
link: 'https://github.com/opentrx/seata-python',
type: 'normal',
},
],
versionNote: {
text: 'Release Note of 1.4.2',
link: 'https://github.com/seata/seata/releases/tag/v1.4.2',
text: 'Release Note of 1.6.1',
link: 'https://github.com/seata/seata/releases/tag/v1.6.1',
},
releaseDate: 'Released on Apr 26, 2021',
releaseDate: 'Released on Dec 21, 2022',
},
introduction: {
title: 'Seata 是什么?',
desc: 'Seata 是一款开源的分布式事务解决方案,致力于在微服务架构下提供高性能和简单易用的分布式事务服务。在 Seata 开源之前,Seata 对应的内部版本在阿里经济体内部一直扮演着分布式一致性中间件的角色帮助经济体平稳的度过历年的双11对各BU业务进行了有力的支撑。经过多年沉淀与积累商业化产品先后在阿里云、金融云进行售卖。2019.1 为了打造更加完善的技术生态和普惠技术成果Seata 正式宣布对外开源,未来 Seata 将以社区共建的形式帮助其技术更加可靠与完备。',
desc: 'Seata 是一款开源的分布式事务解决方案,致力于在微服务架构下提供高性能和简单易用的分布式事务服务。在 Seata 开源之前,其内部版本在阿里系内部一直扮演着应用架构层数据一致性的中间件角色帮助经济体平稳的度过历年的双11对上层业务进行了有力的技术支撑。经过多年沉淀与积累其商业化产品先后在阿里云、金融云上售卖。2019.1 为了打造更加完善的技术生态和普惠技术成果Seata 正式宣布对外开源,未来 Seata 将以社区共建的形式帮助用户快速落地分布式事务解决方案。',
img: 'https://img.alicdn.com/tfs/TB1rDpkJAvoK1RjSZPfXXXPKFXa-794-478.png',
},
landscape:{
title: '微服务生态全景图',
},
features: {
title: '特色功能',
list: [
{
icon: 'feature-1',
title: '微服务框架支持',
content: '目前已支持Dubbo、Spring Cloud、Sofa-RPC、Motan和grpc等RPC框架其他框架持续集成中',
content: '目前已支持Dubbo、Spring Cloud、Sofa-RPC、Motan 和 gRPC 等RPC框架其他框架持续集成中',
},
{
icon: 'feature-2',
title: 'AT 模式',
content: '提供无侵入自动补偿的事务模式目前已支持MySQL、Oracle、PostgreSQL、TiDB和MariaDB的AT模式H2、DB2、SQLServer、达梦开发中',
content: '提供无侵入自动补偿的事务模式目前已支持MySQL、Oracle、PostgreSQL、TiDB 和 MariaDB。H2、DB2、SQLServer、达梦开发中',
},
{
icon: 'feature-3',
@ -59,7 +67,7 @@ export default {
{
icon: 'feature-4',
title: 'SAGA 模式',
content: '为长事务提供有效的解决方案',
content: '为长事务提供有效的解决方案,提供编排式与注解式(开发中)',
},
{
icon: 'feature-5',
@ -69,7 +77,7 @@ export default {
{
icon: 'feature-6',
title: '高可用',
content: '支持基于数据库存储的集群模式,水平扩展能力强',
content: '支持计算分离集群模式,水平扩展能力强的数据库和 Redis 存储模式.Raft模式Preview阶段',
},
],
},
@ -79,7 +87,7 @@ export default {
href="https://github.com/seata/seata/issues/1246">Wanted: who&#39;s using Seata</a> 上提供信息来帮助 Seata 做的更好</span>,
list: [
'https://img.alicdn.com/imgextra/i1/O1CN01TleQq128FAP8POtL5_!!6000000007902-2-tps-241-42.png' ,
'https://img.alicdn.com/tfs/TB1wuuCoET1gK0jSZFhXXaAtVXa-496-202.jpg' ,
'https://img.alicdn.com/imgextra/i4/O1CN01IOIk0s1bWgJ05f4HF_!!6000000003473-2-tps-1200-699.png' ,
'https://img.alicdn.com/tfs/TB1Ly5oS3HqK1RjSZFPXXcwapXa-238-54.png' ,
'https://img.alicdn.com/imgextra/i3/O1CN01Hohqhm1JvGPE4cSD4_!!6000000001090-1-tps-436-84.gif' ,
'https://img.alicdn.com/tfs/TB1hvabw9f2gK0jSZFPXXXsopXa-174-100.png' ,
@ -264,16 +272,19 @@ export default {
},
],
versionNote: {
text: 'Release Note of 1.4.2',
link: 'https://github.com/seata/seata/releases/tag/v1.4.2',
text: 'Release Note of 1.6.1',
link: 'https://github.com/seata/seata/releases/tag/v1.6.1',
},
releaseDate: 'Released on Apr 26, 2021',
releaseDate: 'Released on Dec 21, 2022',
},
introduction: {
title: 'What is Seata?',
desc: 'Seata is an open source distributed transaction solution that delivers high performance and easy to use distributed transaction services under a microservices architecture. Before the open-source of Seata, the internal version of Seata played a role of distributed consistency Middleware in Ali economy, helping the economy to survive the double 11 of the past years smoothly, and providing strong support for businesses of all departments. After years of precipitation and accumulation, commercial products have been sold in Alibaba cloud and financial cloud. 2019.1 in order to create a more complete technological ecology and inclusive technological achievements, Seata officially announced open source to the outside world. In the future, Seata will help its technology become more reliable and complete in the form of community building.',
desc: 'Seata is an open source distributed transaction solution that delivers high performance and easy to use distributed transaction services under a microservices architecture. Before the open source of Seata, its internal version has been playing the role of middleware for data consistency of application architecture layer in Alibaba group, helping the economy to smoothly go through the Double 11 of the past year and providing strong technical support for the upper business. After years of development, its commercial products have been sold on Alibaba Cloud and Financial cloud. 2019.1 in order to create a more complete technological ecology and inclusive technological achievements, Seata officially announced open source to the outside world. In the future, Seata will organize as a community to help users quickly land distributed transaction solutions.',
img: 'https://img.alicdn.com/tfs/TB1rDpkJAvoK1RjSZPfXXXPKFXa-794-478.png',
},
landscape:{
title: 'microservice ecosystem landscape',
},
features: {
title: 'Feature List',
list: [
@ -315,7 +326,7 @@ export default {
href="https://github.com/seata/seata/issues/1246">Wanted: who&#39;s using Seata</a> to help improving seata better.</span>,
list: [
'https://img.alicdn.com/imgextra/i1/O1CN01TleQq128FAP8POtL5_!!6000000007902-2-tps-241-42.png' ,
'https://img.alicdn.com/tfs/TB1wuuCoET1gK0jSZFhXXaAtVXa-496-202.jpg' ,
'https://img.alicdn.com/imgextra/i4/O1CN01IOIk0s1bWgJ05f4HF_!!6000000003473-2-tps-1200-699.png' ,
'https://img.alicdn.com/tfs/TB1Ly5oS3HqK1RjSZFPXXcwapXa-238-54.png' ,
'https://img.alicdn.com/imgextra/i3/O1CN01Hohqhm1JvGPE4cSD4_!!6000000001090-1-tps-436-84.gif' ,
'https://img.alicdn.com/tfs/TB1hvabw9f2gK0jSZFPXXXsopXa-174-100.png' ,

View File

@ -17,11 +17,12 @@ export default {
text: 'DOCS',
link: '/en-us/docs/overview/what-is-seata.html',
},
{
key: 'enterprise',
text: 'SEATA IN CLOUD',
link: 'https://h5.dingtalk.com/circle/healthCheckin.html?dtaction=os&corpId=ding42dbb24c1f5a084996093958e605f031&f4ffe=77a6c&cbdbhh=qwertyuiop',
},
// {
// key: 'enterprise',
// text: 'SEATA IN CLOUD',
// link: 'https://cn.aliyun.com/product/aliware/mse?spm=seata-website.topbar.0.0.0',
// imgUrl: 'https://img.alicdn.com/imgextra/i4/O1CN01iksJGI1TOscjbXlOD_!!6000000002373-2-tps-30-30.png'
// },
{
key: 'solution',
text: 'SOLUTIONS',
@ -29,8 +30,9 @@ export default {
imgUrl: 'https://img.alicdn.com/tfs/TB1esl_m.T1gK0jSZFrXXcNCXXa-200-200.png',
children: [{
key: 'gts',
text: 'Distributed transaction solution',
link: 'https://www.aliyun.com/aliware/txc?spm=seata-website.topbar.0.0.0'
text: 'SEATA IN CLOUD',
link: 'https://www.aliyun.com/aliware/txc?spm=seata-website.topbar.0.0.0',
imgUrl: 'https://img.alicdn.com/imgextra/i4/O1CN01iksJGI1TOscjbXlOD_!!6000000002373-2-tps-30-30.png'
}, {
key: 'micoservice',
text: 'Microservice solutions',
@ -52,7 +54,11 @@ export default {
key: 'mesh',
text: 'Service mesh solution',
link: 'https://www.aliyun.com/product/servicemesh?spm=seata-website.topbar.0.0.0',
}
}, {
key: 'sofa',
text: 'SOFA distributed transaction',
link: 'https://help.aliyun.com/document_detail/132903.html?spm=seata-website.topbar.0.0.0',
}
]
},
{
@ -60,6 +66,11 @@ export default {
text: 'DEVELOPERS',
link: '/en-us/docs/developers/developers_dev.html',
},
{
key: 'recruitment',
text: 'RECRUITMENT',
link: 'https://mp.weixin.qq.com/s/nvDmIJEuDaNEY3RfTA3UyA',
},
{
key: 'blog',
text: 'BLOG',
@ -74,6 +85,11 @@ export default {
key: 'download',
text: 'DOWNLOAD',
link: '/en-us/blog/download.html',
},
{
key: 'change',
text: ' ',
link: '/zh-cn/index.html',
}
],
vision: {
@ -112,6 +128,14 @@ export default {
text: 'Community',
link: '/en-us/community/index.html',
},
{
text: 'Simplified Chinese',
link: '/zh-cn/index.html',
},
{
text: 'English',
link: '/en-us/index.html',
},
],
},
copyright: 'Copyright © 2022 Seata',
@ -128,20 +152,22 @@ export default {
text: '文档',
link: '/zh-cn/docs/overview/what-is-seata.html',
},
{
key: 'enterprise',
text: 'Seata企业版',
link: 'https://h5.dingtalk.com/circle/healthCheckin.html?dtaction=os&corpId=ding42dbb24c1f5a084996093958e605f031&f4ffe=77a6c&cbdbhh=qwertyuiop',
},
// {
// key: 'enterprise',
// text: 'Seata企业版',
// link: 'https://cn.aliyun.com/product/aliware/mse?spm=seata-website.topbar.0.0.0',
// imgUrl: 'https://img.alicdn.com/imgextra/i4/O1CN01iksJGI1TOscjbXlOD_!!6000000002373-2-tps-30-30.png'
// },
{
key: 'solution',
text: '解决方案',
link: '',
imgUrl: 'https://img.alicdn.com/tfs/TB1esl_m.T1gK0jSZFrXXcNCXXa-200-200.png',
children: [{
key: 'gts',
text: '分布式事务解决方案',
link: 'https://www.aliyun.com/aliware/txc?spm=seata-website.topbar.0.0.0'
key: 'seata',
text: 'Seata企业版',
link: 'https://cn.aliyun.com/product/aliware/mse?spm=seata-website.topbar.0.0.0',
imgUrl: 'https://img.alicdn.com/imgextra/i4/O1CN01iksJGI1TOscjbXlOD_!!6000000002373-2-tps-30-30.png'
}, {
key: 'micoservice',
text: '微服务解决方案',
@ -163,7 +189,11 @@ export default {
key: 'mesh',
text: '服务网格解决方案',
link: 'https://www.aliyun.com/product/servicemesh?spm=seata-website.topbar.0.0.0',
}
}, {
key: 'sofa',
text: 'SOFA分布式事务',
link: 'https://help.aliyun.com/document_detail/132903.html?spm=seata-website.topbar.0.0.0',
}
]
},
{
@ -171,6 +201,11 @@ export default {
text: '开发者',
link: '/zh-cn/docs/developers/developers_dev.html',
},
{
key: 'recruitment',
text: '团队招聘',
link: 'https://mp.weixin.qq.com/s/nvDmIJEuDaNEY3RfTA3UyA',
},
{
key: 'blog',
text: '博客',
@ -186,6 +221,11 @@ export default {
text: '下载',
link: '/zh-cn/blog/download.html',
},
{
key: 'change',
text: ' ',
link: '/en-us/index.html',
}
],
vision: {
title: '愿景',
@ -223,6 +263,14 @@ export default {
text: '社区',
link: '/zh-cn/community/index.html',
},
{
text: '中文版',
link: '/zh-cn/index.html',
},
{
text: '英文版',
link: '/en-us/index.html',
},
],
},
copyright: 'Copyright © 2022 Seata',

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,7 @@
display: inline-block;
vertical-align: top;
box-sizing: border-box;
padding: 20px 6% 0;
padding: 20px 0% 0 6%;
width: calc(100% - #{$sideMenuWidth});
}
}

View File

@ -133,6 +133,12 @@ class Home extends Language {
<img src={getLink(dataSource.introduction.img)} />
</div>
</section>
<section className="msemap-section">
<div className="msemap-container">
<h3>{dataSource.landscape.title}</h3>
<div id="mse-arc-container"></div>
</div>
</section>
<section className="feature-section">
<div className="feature-container">
<h3>{dataSource.features.title}</h3>

View File

@ -292,6 +292,18 @@
}
}
}
.msemap-section{
.msemap-container{
h3{
font-family: Avenir-Medium;
font-weight: 700;
font-size: 36px;
color: #333;
text-align: center;
margin-bottom: 20px;
}
}
}
.feature-section {
background: #F9FAFA;
.feature-container {

View File

@ -6,19 +6,26 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="keywords" content="<%= keywords %>" />
<meta name="description" content="<%= description %>" />
<meta name="aes-config" content="pid=xux-opensource&user_type=101&uid=&username=&dim10=seata"/>
<!-- 网页标签标题 -->
<title><%= title %></title>
<link rel="shortcut icon" href="/img/seata_logo_small.jpeg"/>
<link rel="stylesheet" href="<%= rootPath %>/build/<%= page %>.css" />
<link rel="stylesheet" href="https://g.alicdn.com/mamba/assets/0.0.19/mse-arc-ui.min.css" />
</head>
<body>
<div id="root"><%- __html %></div>
<script src="https://f.alicdn.com/react/15.4.1/react-with-addons.min.js"></script>
<script src="https://f.alicdn.com/react/15.4.1/react-dom.min.js"></script>
<script src="//g.alicdn.com/alilog/mlog/aplus_v2.js" id="beacon-aplus" exparams="clog=o&aplus&sidx=aplusSidx&ckx=aplusCkx"></script>
<script src="//g.alicdn.com/aes/??tracker/1.0.34/index.js,tracker-plugin-pv/2.4.5/index.js,tracker-plugin-event/1.2.5/index.js,tracker-plugin-jserror/1.0.13/index.js,tracker-plugin-api/1.1.14/index.js,tracker-plugin-perf/1.1.8/index.js,tracker-plugin-eventTiming/1.0.4/index.js"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-X4LJGF90X2"></script>
<script>
window.rootPath = '<%= rootPath %>';
</script>
<script src="<%= rootPath %>/build/<%= page %>.js"></script>
<script src="https://g.alicdn.com/mamba/assets/0.0.19/mse-arc-ui.min.js"></script>
<script>
var _hmt = _hmt || [];
(function() {
@ -27,6 +34,11 @@
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-X4LJGF90X2');
</script>
</body>
</html>