提交 a5f8723c authored 作者: Christian Buchegger's avatar Christian Buchegger

Session.getTransactionId should return a more distinguishing value

The newly introduced Transaction.sequenceNum is a better choice than Transaction.transactionId
上级 2da82c8e
...@@ -1634,7 +1634,7 @@ public class Session extends SessionWithState implements TransactionStore.Rollba ...@@ -1634,7 +1634,7 @@ public class Session extends SessionWithState implements TransactionStore.Rollba
if (transaction == null) { if (transaction == null) {
return ValueNull.INSTANCE; return ValueNull.INSTANCE;
} }
return ValueString.get(Long.toString(getTransaction().getId())); return ValueString.get(Long.toString(getTransaction().getSequenceNum()));
} }
if (!database.isPersistent()) { if (!database.isPersistent()) {
return ValueNull.INSTANCE; return ValueNull.INSTANCE;
......
...@@ -126,6 +126,10 @@ public class Transaction { ...@@ -126,6 +126,10 @@ public class Transaction {
return transactionId; return transactionId;
} }
public long getSequenceNum() {
return sequenceNum;
}
public int getStatus() { public int getStatus() {
return getStatus(statusAndLogId.get()); return getStatus(statusAndLogId.get());
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论