Skip to content

Commit 24e2a32

Browse files
committed
id seq len.
1 parent 3c8eff0 commit 24e2a32

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

txlcn-tc/src/main/java/com/codingapi/txlcn/tc/txmsg/TCSideRpcInitCallBack.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public void connected(String remoteKey) {
8282
txClientConfig.applyMachineId(resParams.getMachineId());
8383

8484
// 2. IdGen 初始化
85-
IdGenInit.applyDefaultIdGen(resParams.getMachineLen(), resParams.getMachineId());
85+
IdGenInit.applyDefaultIdGen(resParams.getSeqLen(), resParams.getMachineId());
8686

8787
// 3. 日志
8888
log.info("Finally, determined dtx time is {}ms, tm rpc timeout is {} ms, machineId is {}",

txlcn-tm/src/main/java/com/codingapi/txlcn/tm/txmsg/transaction/InitClientService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public Serializable execute(TransactionCmd transactionCmd) throws TxManagerExcep
7474
InitClientParams initClientParams = transactionCmd.getMsg().loadBean(InitClientParams.class);
7575
rpcClient.bindAppName(transactionCmd.getRemoteKey(), initClientParams.getAppName());
7676
// Machine len and id
77-
initClientParams.setMachineLen(txManagerConfig.getSeqLen());
77+
initClientParams.setSeqLen(txManagerConfig.getSeqLen());
7878
initClientParams.setMachineId(managerService.machineIdSync());
7979
// DTX Time and TM timeout.
8080
initClientParams.setDtxTime(txManagerConfig.getDtxTime());

txlcn-txmsg/src/main/java/com/codingapi/txlcn/txmsg/params/InitClientParams.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ public class InitClientParams implements Serializable {
4545
private long tmRpcTimeout;
4646

4747
/**
48-
* 机器ID长度
48+
* ID序列长度
4949
*/
50-
private int machineLen;
50+
private int seqLen;
5151

5252
/**
5353
* 分配的机器ID

0 commit comments

Comments
 (0)