Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Motivation
Currently, RW transaction resolves only write intents by itself. If RW transaction steps on a write intent from another transaction, an assertion error will appear.
// Should never happen, currently, locks prevent reading another transaction intents during RW requests. throw new AssertionError("Mismatched transaction id, expectedTxId={" + txId + "}," + " actualTxId={" + retrievedResultTxId + '}');
Really, we will be able to leave write intent in case when node restarted before it can handle cleanup message. Now, we workaround the case by scanning storage for logging for write intent and commit them on start:
try (PartitionTimestampCursor cursor = partitionDataStorage.scan(HybridTimestamp.MAX_VALUE)) { while (cursor.hasNext()) { ReadResult readResult = cursor.next(); if (readResult.isWriteIntent()) { txsPendingRowIds.computeIfAbsent(readResult.transactionId(), key -> new TreeSet<>()).add(readResult.rowId()); } } }
But this is very time-consuming.
Attachments
Issue Links
- blocks
-
IGNITE-17578 Transactions: async cleanup processing on tx commit
- Resolved
-
IGNITE-18502 Excessive full partition scan on node start
- Resolved
-
IGNITE-20052 Release all locks locally on self primary replica expiration
- Resolved
- is related to
-
IGNITE-20148 Explicit writeIntent cleanup on primary replica
- Resolved
- links to