Skip to content

Commit

Permalink
application.example.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Bughue committed Nov 9, 2023
1 parent 2700d05 commit 8c03d64
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 6 deletions.
8 changes: 4 additions & 4 deletions common/src/main/java/io/seata/common/ConfigurationKeys.java
Original file line number Diff line number Diff line change
Expand Up @@ -985,20 +985,20 @@ public interface ConfigurationKeys {
/**
* The constant RM_APPLICATION_DATA_SIZE_ERROR
*/
String RM_APPLICATION_DATA_SIZE_ERROR = CLIENT_RM_PREFIX + "applicationDataErrSize";
String RM_APPLICATION_DATA_SIZE_LIMIT = CLIENT_RM_PREFIX + "applicationDataLimit";

/**
* The constant RM_APPLICATION_DATA_SIZE_CHECK
*/
String RM_APPLICATION_DATA_SIZE_CHECK = CLIENT_RM_PREFIX + "applicationDataEnable";
String RM_APPLICATION_DATA_SIZE_CHECK = CLIENT_RM_PREFIX + "applicationDataLimitCheck";

/**
* The constant SERVER_APPLICATION_DATA_SIZE_ERROR
*/
String SERVER_APPLICATION_DATA_SIZE_ERROR = SERVER_PREFIX + "applicationDataErrSize";
String SERVER_APPLICATION_DATA_SIZE_LIMIT = SERVER_PREFIX + "applicationDataLimit";

/**
* The constant SERVER_APPLICATION_DATA_SIZE_CHECK
*/
String SERVER_APPLICATION_DATA_SIZE_CHECK = SERVER_PREFIX + "applicationDataCheck";
String SERVER_APPLICATION_DATA_SIZE_CHECK = SERVER_PREFIX + "applicationDataLimitCheck";
}
2 changes: 1 addition & 1 deletion rm/src/main/java/io/seata/rm/AbstractResourceManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public abstract class AbstractResourceManager implements ResourceManager {

private static final Configuration CONFIG = ConfigurationFactory.getInstance();

private static int appDataErrSize = CONFIG.getInt(ConfigurationKeys.RM_APPLICATION_DATA_SIZE_ERROR,
private static int appDataErrSize = CONFIG.getInt(ConfigurationKeys.RM_APPLICATION_DATA_SIZE_LIMIT,
DefaultValues.DEFAULT_APPLICATION_DATA_SIZE_ERR);

private static boolean throwDataSizeExp = CONFIG.getBoolean(ConfigurationKeys.RM_APPLICATION_DATA_SIZE_CHECK, false);
Expand Down
2 changes: 2 additions & 0 deletions script/client/conf/file.conf
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ client {
sqlParserType = "druid"
branchExecutionTimeoutXA = 60000
connectionTwoPhaseHoldTimeoutXA = 10000
applicationDataLimit = 64000
applicationDataLimitCheck = false
}
tm {
commitRetryCount = 5
Expand Down
2 changes: 2 additions & 0 deletions script/client/spring/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ seata.client.rm.lock.retry-times=30
seata.client.rm.lock.retry-policy-branch-rollback-on-conflict=true
seata.client.rm.branchExecutionTimeoutXA=60000
seata.client.rm.connectionTwoPhaseHoldTimeoutXA=10000
seata.client.rm.applicationDataLimit=64000
seata.client.rm.applicationDataLimitCheck=false
seata.client.tm.commit-retry-count=5
seata.client.tm.rollback-retry-count=5
seata.client.tm.default-global-transaction-timeout=60000
Expand Down
2 changes: 2 additions & 0 deletions script/client/spring/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ seata:
saga-compensate-persist-mode-update: false
tcc-action-interceptor-order: -2147482648 #Ordered.HIGHEST_PRECEDENCE + 1000
sql-parser-type: druid
applicationDataLimit: 64000
applicationDataLimitCheck: false
lock:
retry-interval: 10
retry-times: 30
Expand Down
2 changes: 2 additions & 0 deletions script/config-center/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ server.session.branchAsyncQueueSize=5000
server.session.enableBranchAsyncRemove=false
server.enableParallelRequestHandle=true
server.enableParallelHandleBranch=false
server.applicationDataLimit=64000
server.applicationDataLimitCheck=false

server.raft.cluster=127.0.0.1:7091,127.0.0.1:7092,127.0.0.1:7093
server.raft.snapshotInterval=600
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ public class ServerProperties {
private Integer servicePort;
private Integer xaerNotaRetryTimeout = 60000;

private Boolean applicationDataLimitCheck = false;
private Integer applicationDataLimit = 64000;

public long getMaxCommitRetryTimeout() {
return maxCommitRetryTimeout;
}
Expand Down Expand Up @@ -114,4 +117,19 @@ public void setEnableParallelHandleBranch(Boolean enableParallelHandleBranch) {
this.enableParallelHandleBranch = enableParallelHandleBranch;
}

public Boolean getApplicationDataLimitCheck() {
return applicationDataLimitCheck;
}

public void setApplicationDataLimitCheck(Boolean applicationDataLimitCheck) {
this.applicationDataLimitCheck = applicationDataLimitCheck;
}

public Integer getApplicationDataLimit() {
return applicationDataLimit;
}

public void setApplicationDataLimit(Integer applicationDataLimit) {
this.applicationDataLimit = applicationDataLimit;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public AbstractCore(RemotingServer remotingServer) {
throw new IllegalArgumentException("remotingServer must be not null");
}
this.remotingServer = remotingServer;
this.appDataErrSize = CONFIG.getInt(ConfigurationKeys.SERVER_APPLICATION_DATA_SIZE_ERROR,
this.appDataErrSize = CONFIG.getInt(ConfigurationKeys.SERVER_APPLICATION_DATA_SIZE_LIMIT,
DefaultValues.DEFAULT_APPLICATION_DATA_SIZE_ERR);
this.throwDataSizeExp = CONFIG.getBoolean(ConfigurationKeys.SERVER_APPLICATION_DATA_SIZE_CHECK, false);

Expand Down
2 changes: 2 additions & 0 deletions server/src/main/resources/application.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ seata:
retry-dead-threshold: 130000
xaer-nota-retry-timeout: 60000
enableParallelRequestHandle: true
applicationDataLimitCheck: true
applicationDataLimit: 64000
recovery:
committing-retry-period: 1000
async-committing-retry-period: 1000
Expand Down

0 comments on commit 8c03d64

Please sign in to comment.