ibessonov commented on code in PR #7799:
URL: https://github.com/apache/ignite-3/pull/7799#discussion_r3064070871
##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/HeapLockManager.java:
##########
@@ -630,7 +625,7 @@ public CompletableFuture<Lock> acquire(UUID txId, LockMode
lockMode) {
// Prevent deadlocks by allowing only younger
transactions to wait.
for (Lock lock : ixlockOwners.values()) {
- if
(deadlockPreventionPolicy.txIdComparator().compare(txId, lock.txId()) < 0) {
+ if (TransactionIds.compare(txId, lock.txId())
< 0) {
Review Comment:
I believe that now the code behaves differently than the
`deadlockPreventionPolicy.txIdComparator()`. It could have used reversed order.
Which of the implementations is correct, an old one or a new one?
##########
modules/transactions/src/test/java/org/apache/ignite/internal/tx/NoneDeadlockPreventionTest.java:
##########
@@ -38,7 +38,7 @@ protected DeadlockPreventionPolicy deadlockPreventionPolicy()
{
@Override
protected Matcher<CompletableFuture<Lock>> conflictMatcher(UUID txId) {
Review Comment:
Does it need `txId` now at all, is it used somewhere?
##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/TxManagerImpl.java:
##########
@@ -488,8 +488,7 @@ private ReadWriteTransactionImpl beginReadWriteTransaction(
boolean implicit,
InternalTxOptions options
) {
- UUID txId = options.retryId() != null ? options.retryId()
- : transactionIdGenerator.transactionIdFor(beginTimestamp,
options.priority());
+ UUID txId = transactionIdGenerator.transactionIdFor(beginTimestamp,
options.priority());
Review Comment:
Why is this reverted back from ` options.retryId() != null ?
options.retryId() : ...`? Was the change wrong?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]