sanpwc commented on code in PR #3469:
URL: https://github.com/apache/ignite-3/pull/3469#discussion_r1539414164
##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/VolatileTxStateMetaStorage.java:
##########
@@ -100,4 +104,65 @@ public TxStateMeta state(UUID txId) {
public Collection<TxStateMeta> states() {
return txStateMap.values();
}
+
+ /**
+ * Locally vacuums no longer needed transactional resource.
+ * For each finished (COMMITED or ABORTED) transactions:
+ * <ol>
+ * <li> Removes it from the volatile storage if txnResourcesTTL == 0
or if
+ * txnState.initialVacuumObservationTimestamp + txnResourcesTTL <
vacuumObservationTimestamp.</li>
+ * <li>Updates txnState.initialVacuumObservationTimestamp by setting
it to vacuumObservationTimestamp
+ * if it's not already initialized.</li>
+ * </ol>
+ *
+ * @param vacuumObservationTimestamp Timestamp of the vacuum attempt.
+ * @param txnResourceTtl Transactional resource time to live in
milliseconds.
+ */
+ public void vacuum(long vacuumObservationTimestamp, long txnResourceTtl) {
+ LOG.info("Vacuum started vacuumObservationTimestamp={}
txnResourceTtl={}", vacuumObservationTimestamp, txnResourceTtl);
Review Comment:
Fixed.
##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/ResourceVacuumManager.java:
##########
@@ -149,9 +147,21 @@ private void cleanupOrphanTxResources() {
}
}
} catch (Throwable err) {
+ // TODO https://issues.apache.org/jira/browse/IGNITE-21829 Use
failure handler instead.
Review Comment:
Fixed.
--
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]