Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

合并最新代码 #2

Merged
merged 32 commits into from
Dec 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
709c43f
optimize: delete unnecessary @Sharable (#3319)
suichen Dec 5, 2020
b804216
optimize: replace StringBuffer to StringBuilder (#3313)
wangliang181230 Dec 5, 2020
5a85c5c
optimize: modify TransactionPropagationInterceptor name (#3335)
springlayer Dec 5, 2020
10c03d0
optimize: enable NamedThreadFactory to get ThreadGroup from the Secur…
jxlgzwh Dec 6, 2020
4853e10
optimize: load balance strategy use constants (#3320)
LiWenGu Dec 8, 2020
3530aa0
bugfix: Saga statemachine definition json cannot enable jackson parse…
long187 Dec 8, 2020
c2c3488
bugfix:throw exception when update pk (#3287)
0000005 Dec 8, 2020
465f28b
bugfix: clean root context when state machine inst record failed (#3323)
anselleeyy Dec 8, 2020
e84feea
bugfix: fix wrong status when exception (#3281)
anselleeyy Dec 8, 2020
3e50fe5
optimize: adjust GlobalLockTemplateTest (#3345)
selfishlover Dec 8, 2020
7ce31c6
bugfix: fix throw NPE when get the state list (#2949)
wangliang181230 Dec 8, 2020
f0711ad
bugfix: fix throw IllegalArgumentException when use hystrix when usin…
wangliang181230 Dec 9, 2020
da40fb5
bugfix: the problem test case (#3349)
funky-eyes Dec 9, 2020
7ba2e81
bugfix: fix retry commit unsuccess when record subMachineInst failed …
anselleeyy Dec 9, 2020
b4ce245
bugfix: fix deploy staging rule check failed (#3357)
slievrly Dec 9, 2020
1903ac6
bugfix: temporarily cancels unwanted test case (#3359)
funky-eyes Dec 10, 2020
c5edee5
optimize: optimize ParameterParserTest test case failed (#3365)
slievrly Dec 14, 2020
1f9e7cf
migrate: Migrate CI provider from Travis CI to Github Actions. (#3343)
ujjboy Dec 14, 2020
d171a81
optimize: add github action secrets env for dockerHub (#3369)
slievrly Dec 14, 2020
f5ee231
optimize: mysql jdbc connect param (#3291)
caohdgege Dec 14, 2020
f6193e3
optimize: get netty config property from system properties. (#3336)
jsbxyyx Dec 14, 2020
0944fe5
optimize: improve UUIDGenerator using "history time" version of snowf…
selfishlover Dec 15, 2020
aeeda42
feature: support rollback info compress (#3172)
caohdgege Dec 15, 2020
6075716
bugfix: configuration cache get value cast exception. (#3293)
jsbxyyx Dec 16, 2020
de56e17
optimize: optimize github action (#3385)
slievrly Dec 21, 2020
80ea72a
bugfix: fix AsyncWorker potential OOM problem (#3258)
selfishlover Dec 21, 2020
5d4c991
optimize: get config from file system even without file: prefix (#3341)
hoverruan Dec 21, 2020
2bd39c9
optimize: optimize StatementProxyTest unit test (#3383)
l81893521 Dec 22, 2020
2598b16
test: add test case for tmClient (#3381)
Ifdevil Dec 23, 2020
491a9d7
feature: Saga support customize whether update last retry log (#3372)
anselleeyy Dec 24, 2020
ab01b84
optimize: add the change records folder (#3397)
funky-eyes Dec 24, 2020
08fbcef
bugfix: forbidden use order by or limit in multi sql (#3241)
caohdgege Dec 24, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: build

on:
push:
branches: [ develop,master ]
pull_request:
branches: [ develop,master ]

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [8, 11]
os: [ ubuntu-18.04 ]
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Set up ENV
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
run: if [ "${{ matrix.java }}" == "8" ]; then
echo "IMAGE_NAME=openjdk:8u212-jre-alpine" >> $GITHUB_ENV;
elif [ "${{ matrix.java }}" == "11" ]; then
echo "IMAGE_NAME=openjdk:11-jre-stretch" >> $GITHUB_ENV;
fi
- name: Build with Maven
env:
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
# https://docs.github.com/cn/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#github-context
run: if [ "${{github.event_name}}" == "push" ] && [ "${{github.ref}}" == "refs/heads/develop" ]; then
./mvnw clean install -DskipTests=false -Dcheckstyle.skip=false -Dlicense.skip=false -P image -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn;
else
./mvnw clean install -DskipTests=false -Dcheckstyle.skip=false -Dlicense.skip=false -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn;
fi
- name: Codecov
uses: codecov/codecov-action@v1
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ Commit content represents all content changes included in one commit. We had bet
* avoid very large change in a commit;
* complete and reviewable for each commit.
* check git config(`user.name`, `user.email`) when committing to ensure that it is associated with your github ID.
* when submitting pr, please add a brief description of the current changes to the X.X.X.md file under the 'changes/' folder


In addition, in the code change part, we suggest that all contributors should read the [code style of Seata](#code-style).
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Seata: Simple Extensible Autonomous Transaction Architecture

[![Build Status](https://travis-ci.org/seata/seata.svg?branch=develop)](https://travis-ci.org/seata/seata)
[![Build Status](https://github.com/seata/seata/workflows/build/badge.svg?branch=develop)](https://github.com/seata/seata/actions)
[![codecov](https://codecov.io/gh/seata/seata/branch/develop/graph/badge.svg)](https://codecov.io/gh/seata/seata)
[![license](https://img.shields.io/github/license/seata/seata.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
[![maven](https://img.shields.io/maven-central/v/io.seata/seata-parent.svg)](https://search.maven.org/search?q=io.seata)
Expand Down
7 changes: 7 additions & 0 deletions all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,11 @@
<artifactId>seata-compressor-lz4</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.seata</groupId>
<artifactId>seata-compressor-deflater</artifactId>
<version>${project.version}</version>
</dependency>

<!-- saga -->
<dependency>
Expand Down Expand Up @@ -681,11 +686,13 @@
<include>io.seata:seata-saga-rm</include>
<include>io.seata:seata-saga-tm</include>
<include>io.seata:seata-saga-engine-store</include>
<!--compressor-->
<include>io.seata:seata-compressor-gzip</include>
<include>io.seata:seata-compressor-7z</include>
<include>io.seata:seata-compressor-bzip2</include>
<include>io.seata:seata-compressor-zip</include>
<include>io.seata:seata-compressor-lz4</include>
<include>io.seata:seata-compressor-deflater</include>
</includes>
</artifactSet>
<transformers>
Expand Down
74 changes: 74 additions & 0 deletions changes/1.5.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
### 1.5.0

[source](https://github.com/seata/seata/archive/v1.5.0.zip) |
[binary](https://github.com/seata/seata/releases/download/v1.5.0/seata-server-1.5.0.zip)

<details>
<summary><mark>Release notes</mark></summary>


### Seata 1.5.0

Seata 1.5.0 发布。

Seata 是一款开源的分布式事务解决方案,提供高性能和简单易用的分布式事务服务。

此版本更新如下:

### feature:

- [[#3172](https://github.com/seata/seata/pull/3172)] 支持undolog压缩
- [[#3372](https://github.com/seata/seata/pull/3372)] saga模式下支撑用户自定义是否更新最后一次重试日志


### bugfix:

- [[#3258](https://github.com/seata/seata/pull/3258)] 修复AsyncWorker潜在的OOM问题
- [[#3293](https://github.com/seata/seata/pull/3293)] 修复配置缓存获取值时类型不匹配的bug
- [[#3241](https://github.com/seata/seata/pull/3241)] 禁止在多SQL的情况下使用 limit 和 order by 语法



### optimize:

- [[#3383](https://github.com/seata/seata/pull/3383)] 优化StatementProxyTest单元测试
- [[#3341](https://github.com/seata/seata/pull/3341)] 可获取无file:前缀的配置文件
- [[#3385](https://github.com/seata/seata/pull/3385)] 优化github action
- [[#3175](https://github.com/seata/seata/pull/3175)] 重构雪花id算法
- [[#3291](https://github.com/seata/seata/pull/3291)] 优化mysql连接参数
- [[#3336](https://github.com/seata/seata/pull/3336)] 从环境变量中获取netty配置属性
- [[#3369](https://github.com/seata/seata/pull/3369)] 添加github action的dockerHub秘钥
- [[#3343](https://github.com/seata/seata/pull/3343)] 将CI程序从Travis CI迁移到Github Actions
- [[#3365](https://github.com/seata/seata/pull/3365)] 修复ParameterParserTest测试用例
- [[#3359](https://github.com/seata/seata/pull/3359)] 删除未使用的测试用例
- [[#3397](https://github.com/seata/seata/pull/3397)] 添加更改记录文件夹



### test

- [[#3381](https://github.com/seata/seata/pull/3381)] 添加 TmClient 的测试用例


非常感谢以下 contributors 的代码贡献。若有无意遗漏,请报告。

- [slievrly](https://github.com/slievrly)
- [selfishlover](https://github.com/selfishlover)
- [l8189352](https://github.com/l81893521)
- [hoverruan](https://github.com/hoverruan )
- [jsbxyyx](https://github.com/jsbxyyx)
- [caohdgege](https://github.com/caohdgege)
- [a364176773](https://github.com/a364176773)
- [anselleeyy](https://github.com/anselleeyy)
- [Ifdevil](https://github.com/Ifdevil)

同时,我们收到了社区反馈的很多有价值的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>
70 changes: 70 additions & 0 deletions changes/en-us/1.5.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
### 1.5.0

[source](https://github.com/seata/seata/archive/v1.5.0.zip) |
[binary](https://github.com/seata/seata/releases/download/v1.5.0/seata-server-1.5.0.zip)

<details>
<summary><mark>Release notes</mark></summary>


### Seata 1.5.0

Seata 1.5.0 Released.

Seata is an easy-to-use, high-performance, open source distributed transaction solution.

The version is updated as follows:

### feature:

- [[#3172](https://github.com/seata/seata/pull/3172)] support rollback info compress
- [[#3372](https://github.com/seata/seata/pull/3372)] Saga support customize whether update last retry log


### bugfix:

- [[#3258](https://github.com/seata/seata/pull/3258)] fix AsyncWorker potential OOM problem
- [[#3293](https://github.com/seata/seata/pull/3293)] configuration cache get value cast exception
- [[#3241](https://github.com/seata/seata/pull/3241)] forbidden use order by or limit in multi sql


### optimize:

- [[#3383](https://github.com/seata/seata/pull/3383)] optimize StatementProxyTest unit test
- [[#3341](https://github.com/seata/seata/pull/3341)] get config from file system even without file: prefix
- [[#3385](https://github.com/seata/seata/pull/3385)] optimize github action
- [[#3175](https://github.com/seata/seata/pull/3175)] improve UUIDGenerator using "history time" version of snowflake algorithm
- [[#3291](https://github.com/seata/seata/pull/3291)] mysql jdbc connect param
- [[#3336](https://github.com/seata/seata/pull/3336)] get netty config property from system properties
- [[#3369](https://github.com/seata/seata/pull/3369)] add github action secrets env for dockerHub
- [[#3343](https://github.com/seata/seata/pull/3343)] Migrate CI provider from Travis CI to Github Actions
- [[#3365](https://github.com/seata/seata/pull/3365)] optimize ParameterParserTest test case failed
- [[#3359](https://github.com/seata/seata/pull/3359)] remove unused test case
- [[#3397](https://github.com/seata/seata/pull/3397)] add the change records folder

### test

- [[#3381](https://github.com/seata/seata/pull/3381)] test case for tmClient

Thanks to these contributors for their code commits. Please report an unintended omission.

- [slievrly](https://github.com/slievrly)
- [selfishlover](https://github.com/selfishlover)
- [l8189352](https://github.com/l81893521)
- [hoverruan](https://github.com/hoverruan )
- [jsbxyyx](https://github.com/jsbxyyx)
- [caohdgege](https://github.com/caohdgege)
- [a364176773](https://github.com/a364176773)
- [anselleeyy](https://github.com/anselleeyy)
- [Ifdevil](https://github.com/Ifdevil)

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>
18 changes: 18 additions & 0 deletions common/src/main/java/io/seata/common/DefaultValues.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ public interface DefaultValues {
boolean DEFAULT_CLIENT_TABLE_META_CHECK_ENABLE = false;
boolean DEFAULT_TM_DEGRADE_CHECK = false;
boolean DEFAULT_CLIENT_SAGA_BRANCH_REGISTER_ENABLE = false;
boolean DEFAULT_CLIENT_SAGA_RETRY_PERSIST_MODE_UPDATE = false;
boolean DEFAULT_CLIENT_SAGA_COMPENSATE_PERSIST_MODE_UPDATE = false;

/**
* Shutdown timeout default 3s
*/
Expand Down Expand Up @@ -95,4 +98,19 @@ public interface DefaultValues {

String DEFAULT_LOAD_BALANCE = "RandomLoadBalance";
int VIRTUAL_NODES_DEFAULT = 10;

/**
* the constant DEFAULT_CLIENT_UNDO_COMPRESS_ENABLE
*/
boolean DEFAULT_CLIENT_UNDO_COMPRESS_ENABLE = true;

/**
* the constant DEFAULT_CLIENT_UNDO_COMPRESS_TYPE
*/
String DEFAULT_CLIENT_UNDO_COMPRESS_TYPE = "zip";

/**
* the constant DEFAULT_CLIENT_UNDO_COMPRESS_THRESHOLD
*/
String DEFAULT_CLIENT_UNDO_COMPRESS_THRESHOLD = "64k";
}
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,11 @@ public enum FrameworkErrorCode {
*/
StateMachineExecutionTimeout("0421", "State machine execution timeout", "State machine execution timeout"),

/**
* State machine execution no choice matched
*/
StateMachineNoChoiceMatched("0422", "State machine no choice matched", "State machine no choice matched"),

/**
* Undefined error
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*/
public class NamedThreadFactory implements ThreadFactory {
private final static Map<String, AtomicInteger> PREFIX_COUNTER = new ConcurrentHashMap<>();

private final ThreadGroup group;
private final AtomicInteger counter = new AtomicInteger(0);
private final String prefix;
private final int totalSize;
Expand All @@ -47,6 +47,8 @@ public class NamedThreadFactory implements ThreadFactory {
public NamedThreadFactory(String prefix, int totalSize, boolean makeDaemons) {
int prefixCounter = CollectionUtils.computeIfAbsent(PREFIX_COUNTER, prefix, key -> new AtomicInteger(0))
.incrementAndGet();
SecurityManager securityManager = System.getSecurityManager();
group = (securityManager != null) ? securityManager.getThreadGroup() : Thread.currentThread().getThreadGroup();
this.prefix = prefix + "_" + prefixCounter;
this.makeDaemons = makeDaemons;
this.totalSize = totalSize;
Expand Down Expand Up @@ -78,7 +80,7 @@ public Thread newThread(Runnable r) {
if (totalSize > 1) {
name += "_" + totalSize;
}
Thread thread = new FastThreadLocalThread(r, name);
Thread thread = new FastThreadLocalThread(group, r, name);

thread.setDaemon(makeDaemons);
if (thread.getPriority() != Thread.NORM_PRIORITY) {
Expand Down
Loading