Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Commit

Permalink
mychange 1
Browse files Browse the repository at this point in the history
my change 2

optimize: optimize channel availability thread log output (apache#5563)

feature:docker image supports JVM parameter injection (apache#5529)

test: add unit test for transaction messages (apache#5637)

feature: support trace the transaction link according to the XID (apache#5600)

test: add unit test case for ExporterType/RegistryType (apache#5622)

optimize: possible conflict between asyncCommitting thread and retryCommitting thread (apache#5623)

optimize: possible conflict between asyncCommitting thread and retryCommitting thread (apache#5623)

optimize: support case-sensitive attributes for table and column metadata (apache#5553) (+14 squashed commit)

Squashed commit:

[c97f409] mychange 1

my change 2

optimize: optimize channel availability thread log output (apache#5563)

feature:docker image supports JVM parameter injection (apache#5529)

test: add unit test for transaction messages (apache#5637)

feature: support trace the transaction link according to the XID (apache#5600)

test: add unit test case for ExporterType/RegistryType (apache#5622)

[8f9bba2] bugfix: fix the `asyncCommit` and `queueToRetryCommit` always failed in db mode (apache#5604)

[b2d4584] bugfix: fix log in participant transaction role (apache#5594)

[d0d012c] feature: support sqlserver in AT mode (apache#3887)

[54bd3ca] feature:support MS SqlServer on the server side of AT mode (apache#4033)

[d1e6e6b] bugfix: grpc interceptor xid unbinding problem (apache#5577)

[0b49e06] optimize: The common fence clean task is only initiated when useTCCFence is set to true (apache#5576)

[7e40e05] bugfix: fix mariadb rollback failed (apache#5558)

[ee1ecf7] bugfix: fix oracle insert undolog failed (apache#5556)

Signed-off-by: slievrly <slievrly@163.com>

[0a1edf3] optimize: update expire gpg key and publish workflow (apache#5549)

Signed-off-by: slievrly <slievrly@163.com>

[1c8e4bf] bugfix: the log file path was loaded incorrectly (apache#5531)

[c73d72d] bugfix: fix GlobalStatus=9 can't be cleared in DB storage mode (apache#5523)

[83493d9] optimize: optimize FenceHandler for oracle (apache#5519)

[9b35ba9] bugfix: fix the full table scan issue with 'setDate' condition in Oracle 10g (apache#5498)
  • Loading branch information
slievrly authored and Pil0tXia committed Jun 14, 2023
1 parent 08fd84b commit cc0afea
Show file tree
Hide file tree
Showing 128 changed files with 6,571 additions and 485 deletions.
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
---
name: Bug Report

about: If you would like to report an issue to Seata, please use this template.

notice: Please do not use this issue template to report security vulnerabilities but refer to our [security policy](https://github.com/seata/seata/security/policy).
about: If you would like to report an issue to Seata, please use this template.

---
<!-- Please do not use this issue template to report security vulnerabilities but refer to our [security policy](https://github.com/seata/seata/security/policy). -->

- [ ] I have searched the [issues](https://github.com/seata/seata/issues) of this repository and believe that this is not a duplicate.

Expand Down
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ name: Feature Request

about: Suggest an idea for Seata

notice: Please do not use this issue template to report security vulnerabilities but refer to our [security policy](https://github.com/seata/seata/security/policy).

---
<!-- Please do not use this issue template to report security vulnerabilities but refer to our [security policy](https://github.com/seata/seata/security/policy). -->

## Why you need it?
Is your feature request related to a problem? Please describe in details
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Publishes"
name: "Publish Docker Image"

on:
push:
Expand All @@ -11,39 +11,6 @@ on:

jobs:
# job 1
publish-to-OSSRH:
name: "Publish to OSSRH"
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
# step 1
- name: "Checkout"
uses: actions/checkout@v3
# step 2
- name: "Setup Java JDK"
uses: actions/setup-java@v3.9.0
with:
distribution: 'zulu'
java-version: 8
server-id: oss_seata
server-username: OSSRH_USERNAME # Environment variable name for the username for authentication to the Apache Maven repository. Default is $GITHUB_ACTOR
server-password: OSSRH_PASSWORD # Environment variable name for password or token for authentication to the Apache Maven repository. Default is $GITHUB_TOKEN
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE # Environment variable name for the GPG private key passphrase. Default is $GPG_PASSPHRASE
# step 3
- name: "Print maven version"
run: ./mvnw -version
# step 4
- name: "Publish to OSSRH"
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USER }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
./mvnw -T 4C clean deploy -Prelease,release-by-github-actions -DskipTests -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
# job 2
publish-images-to-dockerhub:
name: "Publish images to DockerHub"
runs-on: ubuntu-latest
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/publish-ossrh.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "Publish OSSRH"

on:
push:
branches: [ develop, 2.x, snapshot, "*.*.*" ]

jobs:
# job 1
publish-to-OSSRH:
name: "Publish to OSSRH"
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
# step 1
- name: "Checkout"
uses: actions/checkout@v2.4.0
# step 2
- name: "Setup Java JDK"
uses: actions/setup-java@v3.9.0
with:
distribution: 'zulu'
java-version: 8
server-id: oss_seata
server-username: OSSRH_USERNAME # Environment variable name for the username for authentication to the Apache Maven repository. Default is $GITHUB_ACTOR
server-password: OSSRH_PASSWORD # Environment variable name for password or token for authentication to the Apache Maven repository. Default is $GITHUB_TOKEN
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE # Environment variable name for the GPG private key passphrase. Default is $GPG_PASSPHRASE
# step 3
- name: "Print maven version"
run: ./mvnw -version
# step 4
- name: "Publish to OSSRH"
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USER }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
./mvnw -T 4C clean deploy -Prelease,release-by-github-actions -DskipTests -e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ install: true

before_script:
- if [ "$TRAVIS_JDK_VERSION" == "openjdk8" ]; then
export IMAGE_NAME="openjdk:8u212-jre-alpine";
export IMAGE_NAME="openjdk:8-jre-slim";
fi
- if [ "$TRAVIS_JDK_VERSION" == "openjdk11" ]; then
export IMAGE_NAME="openjdk:11-jre-stretch";
Expand Down
6 changes: 5 additions & 1 deletion build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@
<junit-jupiter.version>5.8.2</junit-jupiter.version>
<junit-platform.version>1.8.2</junit-platform.version>

<!-- For test -->
<junit-jupiter.version>5.8.2</junit-jupiter.version>
<junit-platform.version>1.8.2</junit-platform.version>

<!-- Maven plugin versions -->
<!-- Build -->
<easyj-maven-plugin.version>1.1.5</easyj-maven-plugin.version>
Expand Down Expand Up @@ -120,7 +124,7 @@
<license.skip>true</license.skip>
<maven.test.skip>false</maven.test.skip>
<maven.surefire.argLine></maven.surefire.argLine>
<gpg.keyname>A1C4DAB9B220DBA0C277E945D6A1420D747D1EE0</gpg.keyname>
<gpg.keyname>37F181C60AACE24BD5C1D3925583F79497E8E293</gpg.keyname>
<gpg.arg1/>
<gpg.arg2/>

Expand Down
25 changes: 23 additions & 2 deletions changes/en-us/2.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ The version is updated as follows:
- [[#5377](https://github.com/seata/seata/pull/5377)] make AbstractHttpExecutor.class support http put
- [[#5396](https://github.com/seata/seata/pull/5396)] TC log appender metric
- [[#5118](https://github.com/seata/seata/pull/5118)] support two-stage concurrent notification execution
- [[#5529](https://github.com/seata/seata/pull/5529)] docker image supports JVM parameter injection
- [[#3887](https://github.com/seata/seata/pull/3887)] add SQL Server database support in AT mode
- [[#4033](https://github.com/seata/seata/pull/4033)] add SQLServer support for Server DB storage mode

### bugfix:
- [[#5194](https://github.com/seata/seata/pull/5194)] fix wrong keyword order for oracle when creating a table
- [[#5021](https://github.com/seata/seata/pull/5201)] fix JDK Reflection for Spring origin proxy failed in JDK17
- [[#5023](https://github.com/seata/seata/pull/5203)] fix `seata-core` dependency transitive conflict in
`seata-dubbo`
- [[#5023](https://github.com/seata/seata/pull/5203)] fix `seata-core` dependency transitive conflict in `seata-dubbo`
- [[#5224](https://github.com/seata/seata/pull/5224)] fix oracle initialize script index_name is duplicate
- [[#5233](https://github.com/seata/seata/pull/5233)] fix the inconsistent configuration item names related to LoadBalance
- [[#5245](https://github.com/seata/seata/pull/5245)] fix the incomplete dependency of distribution module
Expand All @@ -48,6 +50,14 @@ The version is updated as follows:
- [[#5464](https://github.com/seata/seata/pull/5464)] fix global session is always begin in saga mode
- [[#5478](https://github.com/seata/seata/pull/5478)] fix finished transaction swallows exception when committing
- [[#5491](https://github.com/seata/seata/pull/5491)] fix method name not print in logs
- [[#5449](https://github.com/seata/seata/pull/5449)] fix Oracle XA transaction reentrant issues
- [[#5531](https://github.com/seata/seata/pull/5531)] fix the log file path was loaded incorrectly
- [[#5523](https://github.com/seata/seata/pull/5523)] fix GlobalStatus=9 can't be cleared in DB storage mode
- [[#5558](https://github.com/seata/seata/pull/5558)] fix mariadb rollback failed
- [[#5556](https://github.com/seata/seata/pull/5556)] fix oracle insert undolog failed
- [[#5577](https://github.com/seata/seata/pull/5577)] fix grpc interceptor xid unbinding problem
- [[#5594](https://github.com/seata/seata/pull/5594)] fix log in participant transaction role
- [[#5604](https://github.com/seata/seata/pull/5604)] fix the `asyncCommit` and `queueToRetryCommit` always failed in db mode

### optimize:
- [[#5208](https://github.com/seata/seata/pull/5208)] optimize throwable getCause once more
Expand Down Expand Up @@ -78,6 +88,13 @@ The version is updated as follows:
- [[#5485](https://github.com/seata/seata/pull/5485)] optimize server log output
- [[#4907](https://github.com/seata/seata/pull/4907)] optimize thread scheduling and code
- [[#5487](https://github.com/seata/seata/pull/5487)] mark the lockholder of branchsession as final
- [[#5519](https://github.com/seata/seata/pull/5519)] optimize FenceHandler for oracle
- [[#5501](https://github.com/seata/seata/pull/5501)] support updating transaction state with optimistic locking
- [[#5419](https://github.com/seata/seata/pull/5419)] optimize images based on java 8/17 and support maven-3.9.0
- [[#5549](https://github.com/seata/seata/pull/5549)] update expire gpg key and publish workflow
- [[#5576](https://github.com/seata/seata/pull/5576)] The common fence clean task is only initiated when useTCCFence is set to true
- [[#5623](https://github.com/seata/seata/pull/5623)] optimize possible conflict between asyncCommitting thread and retryCommitting thread
- [[#5553](https://github.com/seata/seata/pull/5553)] support case-sensitive attributes for table and column metadata

### test:
- [[#5308](https://github.com/seata/seata/pull/5308)] add unit test [FileLoader, ObjectHolder, StringUtils]
Expand All @@ -86,6 +103,9 @@ The version is updated as follows:
- [[#5366](https://github.com/seata/seata/pull/5366)] fix UpdateExecutorTest failed
- [[#5383](https://github.com/seata/seata/pull/5383)] fix multi spring version test failed
- [[#5391](https://github.com/seata/seata/pull/5391)] add unit test for config module
- [[#5428](https://github.com/seata/seata/pull/5428)] fix FileTransactionStoreManagerTest failed
- [[#5622](https://github.com/seata/seata/pull/5622)] add unit test [ExporterType, RegistryType]
- [[#5637](https://github.com/seata/seata/pull/5637)] add unit test [BatchResultMessage, HeartbeatMessage, RegisterRMResponse, ResultCode, RegisterTMResponse, MergeResultMessage, MergedWarpMessage, Version]


### Contributors:
Expand All @@ -111,6 +131,7 @@ Thanks to these contributors for their code commits. Please report an unintended
- [dmego](https://github.com/dmego)
- [zsp419](https://github.com/zsp419)
- [tuwenlin](https://github.com/tuwenlin)
- [sixlei](https://github.com/sixlei)


Also, we receive many valuable issues, questions and advices from our community. Thanks for you all.
Expand Down
22 changes: 22 additions & 0 deletions changes/zh-cn/2.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单
- [[#5377](https://github.com/seata/seata/pull/5377)] 使AbstractHttpExecutor类支持PUT方式的请求
- [[#5396](https://github.com/seata/seata/pull/5396)] TC 异常日志指标采集
- [[#5118](https://github.com/seata/seata/pull/5118)] 支持二阶段并行下发执行
- [[#5529](https://github.com/seata/seata/pull/5529)] docker镜像支持注入JVM参数到容器
- [[#3887](https://github.com/seata/seata/pull/3887)] 增加AT模式的SQLServer数据库支持
- [[#4033](https://github.com/seata/seata/pull/4033)] 增加ServerDB存储模式的SQLServer支持

### bugfix:
- [[#5194](https://github.com/seata/seata/pull/5194)] 修复使用Oracle作为服务端DB存储时的建表失败问题
Expand All @@ -46,6 +49,14 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单
- [[#5426](https://github.com/seata/seata/pull/5426)] 修复不能获取GlobalTransactional注解问题
- [[#5478](https://github.com/seata/seata/pull/5478)] 修复提交事务时事务已完成不抛出异常问题
- [[#5491](https://github.com/seata/seata/pull/5491)] 修复日志中不打印方法名的问题
- [[#5449](https://github.com/seata/seata/pull/5449)] 修复Oracle XA模式 start 重入问题
- [[#5531](https://github.com/seata/seata/pull/5531)] 修复读取logback文件路径错误的问题
- [[#5523](https://github.com/seata/seata/pull/5523)] 修复 GlobalStatus=9 在DB存储模式无法清除的问题
- [[#5558](https://github.com/seata/seata/pull/5558)] 修复mariadb回滚失败的问题
- [[#5556](https://github.com/seata/seata/pull/5556)] 修复 oracle 插入 undolog 失败问题
- [[#5577](https://github.com/seata/seata/pull/5577)] 修复 grpc拦截器解绑xid失败问题
- [[#5594](https://github.com/seata/seata/pull/5594)] 修复participant情况下的重复日志
- [[#5604](https://github.com/seata/seata/pull/5604)] 修复在DB模式下 `asyncCommit``queueToRetryCommit` 两个方法总是失败的问题

### optimize:
- [[#5208](https://github.com/seata/seata/pull/5208)] 优化多次重复获取Throwable#getCause问题
Expand Down Expand Up @@ -77,6 +88,13 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单
- [[#5485](https://github.com/seata/seata/pull/5485)] 优化Server日志输出
- [[#4907](https://github.com/seata/seata/pull/4907)] 调整二阶段result线程池大小及优化代码
- [[#5487](https://github.com/seata/seata/pull/5487)] 将branchsession中的lockholder增加final修饰
- [[#5519](https://github.com/seata/seata/pull/5519)] 优化 Oracle FenceHandler
- [[#5501](https://github.com/seata/seata/pull/5501)] 支持乐观锁方式更新事务状态
- [[#5419](https://github.com/seata/seata/pull/5419)] 优化镜像发布流水线支持jdk8/17和支持maven 3.9.0
- [[#5549](https://github.com/seata/seata/pull/5549)] 优化 gpg key 和 发布流水线
- [[#5576](https://github.com/seata/seata/pull/5576)] 仅当 useTCCFence 设置为 true 时,才开启 Fence 表清理任务
- [[#5623](https://github.com/seata/seata/pull/5623)] 优化异步提交线程和重试线程之间可能存在的冲突
- [[#5553](https://github.com/seata/seata/pull/5553)] 支持表和列元数据大小写敏感设置

### security:
- [[#5172](https://github.com/seata/seata/pull/5172)] 修复一些安全漏洞的版本
Expand All @@ -88,6 +106,9 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单
- [[#5366](https://github.com/seata/seata/pull/5366)] 修复 UpdateExecutorTest 单测失败问题
- [[#5383](https://github.com/seata/seata/pull/5383)] 修复多Spring版本测试失败
- [[#5391](https://github.com/seata/seata/pull/5391)] 添加 config 模块的单元测试用例
- [[#5428](https://github.com/seata/seata/pull/5428)] 修复 FileTransactionStoreManagerTest 单测失败问题
- [[#5622](https://github.com/seata/seata/pull/5622)] 添加单元测试用例 [ExporterType, RegistryType]
- [[#5637](https://github.com/seata/seata/pull/5637)] 添加单元测试用例 [BatchResultMessage, HeartbeatMessage, RegisterRMResponse, ResultCode, RegisterTMResponse, MergeResultMessage, MergedWarpMessage, Version]


### Contributors:
Expand All @@ -113,6 +134,7 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单
- [dmego](https://github.com/dmego)
- [zsp419](https://github.com/zsp419)
- [tuwenlin](https://github.com/tuwenlin)
- [sixlei](https://github.com/sixlei)

同时,我们收到了社区反馈的很多有价值的issue和建议,非常感谢大家。

Expand Down
4 changes: 4 additions & 0 deletions common/src/main/java/io/seata/common/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ public interface Constants {
* The constant BEAN_NAME_SPRING_APPLICATION_CONTEXT_PROVIDER
*/
String BEAN_NAME_SPRING_APPLICATION_CONTEXT_PROVIDER = "springApplicationContextProvider";
/**
* The constant BEAN_NAME_SPRING_FENCE_CONFIG
*/
String BEAN_NAME_SPRING_FENCE_CONFIG = "SpringFenceConfig";
/**
* The constant BEAN_NAME_FAILURE_HANDLER
*/
Expand Down
82 changes: 82 additions & 0 deletions common/src/main/java/io/seata/common/util/DateUtil.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/*
* 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.
*/

package io.seata.common.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
* The type Date util.
*
* @author slievrly
*/
public class DateUtil {

/**
* Gets current date.
*
* @return the current date
*/
public static Date getCurrentDate() {
return new Date();
}

/**
* Parse date date.
*
* @param dateStr the date str
* @param format the format
* @return the date
* @throws ParseException the parse exception
*/
public static Date parseDate(String dateStr, String format) throws ParseException {
if (StringUtils.isBlank(dateStr)) {
return null;
}
SimpleDateFormat sdf = new SimpleDateFormat(format);
return sdf.parse(dateStr);
}

public static Date parseDateWithoutTime(String dateStr) throws ParseException {
return parseDate(dateStr, "yyyy-MM-dd");
}

public static Date getDateNowPlusDays(int days) throws ParseException {
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DATE, days);
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
String dateStr = dateFormat.format(calendar.getTime());
return dateFormat.parse(dateStr);
}

/**
* Format date string.
*
* @param date the date
* @param format the format
* @return the string
*/
public static String formatDate(Date date, String format) {
if (date == null) {
return null;
}
SimpleDateFormat sdf = new SimpleDateFormat(format);
return sdf.format(date);
}
}
24 changes: 24 additions & 0 deletions common/src/main/java/io/seata/common/util/StringUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -349,4 +349,28 @@ public static String hump2Line(String str) {
return sb.toString();
}

public static boolean hasLowerCase(String str) {
if (null == str) {
return false;
}
for (int i = 0; i < str.length(); i++) {
if (Character.isLowerCase(str.charAt(i))) {
return true;
}
}
return false;
}

public static boolean hasUpperCase(String str) {
if (null == str) {
return false;
}
for (int i = 0; i < str.length(); i++) {
if (Character.isUpperCase(str.charAt(i))) {
return true;
}
}
return false;
}

}
Loading

0 comments on commit cc0afea

Please sign in to comment.