Skip to content

Commit

Permalink
Merge branch 'develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
slievrly committed Jun 17, 2022
2 parents 926653e + 95a89d5 commit 6deacef
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 8 deletions.
3 changes: 3 additions & 0 deletions changes/en-us/develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Add changes here for all PR submitted to the develop branch.
- [[#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


### optimize:
Expand All @@ -19,6 +21,7 @@ Add changes here for all PR submitted to the develop branch.
- [[#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
- [[#4544](https://github.com/seata/seata/pull/4544)] optimize jackson dependencies in TransactionContextFilterTest
- [[#4700](https://github.com/seata/seata/pull/4700)] fix maven-compiler-plugin and maven-resources-plugin execute failed

### test:

Expand Down
4 changes: 3 additions & 1 deletion changes/zh-cn/develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@
- [[#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)] 修复跳过全局锁校验的缺陷

### 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)] 优化控制台导航栏
- [[#4544](https://github.com/seata/seata/pull/4544)] 优化测试用例TransactionContextFilterTest中jackson包依赖问题
- [[#4700](https://github.com/seata/seata/pull/4700)] 修复 maven-compiler-plugin 和 maven-resources-plugin 执行失败

### test:

Expand Down
10 changes: 10 additions & 0 deletions console/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,14 @@
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>**/node_modules/**</exclude>
</excludes>
</resource>
</resources>
</build>
</project>
6 changes: 4 additions & 2 deletions distribution/bin/seata-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ if [ ! -x "$BASEDIR"/logs ]; then
mkdir "$BASEDIR"/logs
fi

CMD_LINE_ARGS=$@

# start
echo "$JAVACMD ${JAVA_OPT}" > ${BASEDIR}/logs/start.out 2>&1 &
nohup $JAVACMD ${JAVA_OPT} >> ${BASEDIR}/logs/start.out 2>&1 &
echo "$JAVACMD ${JAVA_OPT} ${CMD_LINE_ARGS}" > ${BASEDIR}/logs/start.out 2>&1 &
nohup $JAVACMD ${JAVA_OPT} ${CMD_LINE_ARGS} >> ${BASEDIR}/logs/start.out 2>&1 &
echo "seata-server is starting, you can check the ${BASEDIR}/logs/start.out"
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
* @author sharajava
*/
public class ConnectionContext {
private static final Savepoint DEFAULT_SAVEPOINT = new Savepoint() {
private static final Savepoint DEFAULT_SAVEPOINT = new Savepoint() {
@Override
public int getSavepointId() throws SQLException {
return 0;
Expand Down Expand Up @@ -113,6 +113,7 @@ void appendUndoItem(SQLUndoLog sqlUndoLog) {

/**
* Append savepoint
*
* @param savepoint the savepoint
*/
void appendSavepoint(Savepoint savepoint) {
Expand Down Expand Up @@ -362,6 +363,7 @@ public List<SQLUndoLog> getUndoItems() {

/**
* Get the savepoints after target savepoint(include the param savepoint)
*
* @param savepoint the target savepoint
* @return after savepoints
*/
Expand All @@ -381,7 +383,7 @@ private List<Savepoint> getAfterSavepoints(Savepoint savepoint) {
private boolean allBeforeImageEmpty() {
for (List<SQLUndoLog> sqlUndoLogs : sqlUndoItemsBuffer.values()) {
for (SQLUndoLog undoLog : sqlUndoLogs) {
if (null == undoLog.getBeforeImage() || undoLog.getBeforeImage().size() != 0) {
if (null != undoLog.getBeforeImage() && undoLog.getBeforeImage().size() != 0) {
return false;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
*/
package io.seata.rm.datasource;

import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import io.seata.core.exception.TransactionException;
import io.seata.core.exception.TransactionExceptionCode;
import io.seata.core.model.BranchType;
Expand All @@ -25,6 +23,8 @@
import io.seata.rm.datasource.exec.LockWaitTimeoutException;
import io.seata.rm.datasource.mock.MockConnection;
import io.seata.rm.datasource.mock.MockDriver;
import io.seata.rm.datasource.sql.struct.Row;
import io.seata.rm.datasource.sql.struct.TableRecords;
import io.seata.rm.datasource.undo.SQLUndoLog;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
Expand All @@ -33,6 +33,9 @@
import org.junit.jupiter.api.condition.JRE;
import org.mockito.Mockito;

import java.lang.reflect.Field;
import java.lang.reflect.Modifier;

/**
* ConnectionProxy test
*
Expand Down Expand Up @@ -75,7 +78,13 @@ public void initBeforeEach() throws Exception {
public void testLockRetryPolicyRollbackOnConflict() throws Exception {
boolean oldBranchRollbackFlag = (boolean) branchRollbackFlagField.get(null);
branchRollbackFlagField.set(null, true);
ConnectionProxy connectionProxy = new ConnectionProxy(dataSourceProxy, new MockConnection(new MockDriver(), "", null)); connectionProxy.bind(TEST_XID);
ConnectionProxy connectionProxy = new ConnectionProxy(dataSourceProxy, new MockConnection(new MockDriver(), "", null));
connectionProxy.bind(TEST_XID);
SQLUndoLog sqlUndoLog = new SQLUndoLog();
TableRecords beforeImage = new TableRecords();
beforeImage.add(new Row());
sqlUndoLog.setBeforeImage(beforeImage);
connectionProxy.getContext().appendUndoItem(sqlUndoLog);
connectionProxy.appendUndoLog(new SQLUndoLog());
connectionProxy.appendLockKey(lockKey);
Assertions.assertThrows(LockWaitTimeoutException.class, connectionProxy::commit);
Expand All @@ -90,6 +99,11 @@ public void testLockRetryPolicyNotRollbackOnConflict() throws Exception {
connectionProxy.bind(TEST_XID);
connectionProxy.appendUndoLog(new SQLUndoLog());
connectionProxy.appendLockKey(lockKey);
SQLUndoLog sqlUndoLog = new SQLUndoLog();
TableRecords beforeImage = new TableRecords();
beforeImage.add(new Row());
sqlUndoLog.setBeforeImage(beforeImage);
connectionProxy.getContext().appendUndoItem(sqlUndoLog);
Assertions.assertThrows(LockWaitTimeoutException.class, connectionProxy::commit);
branchRollbackFlagField.set(null, oldBranchRollbackFlag);
}
Expand Down
1 change: 1 addition & 0 deletions server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@
<configuration>
<mainClass>io.seata.server.ServerApplication</mainClass>
<layout>ZIP</layout>
<attach>false</attach>
</configuration>
<executions>
<execution>
Expand Down

0 comments on commit 6deacef

Please sign in to comment.