From 06ac225425a2c10b147e5de23cc767e3757fc38c Mon Sep 17 00:00:00 2001 From: Sema Checherinda Date: Wed, 19 Oct 2022 12:42:45 +0200 Subject: [PATCH] canBeRemoved take into account creation_csn then no txn --- src/Interpreters/TransactionVersionMetadata.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Interpreters/TransactionVersionMetadata.cpp b/src/Interpreters/TransactionVersionMetadata.cpp index 19102f4e20c..7671f512bdc 100644 --- a/src/Interpreters/TransactionVersionMetadata.cpp +++ b/src/Interpreters/TransactionVersionMetadata.cpp @@ -243,6 +243,9 @@ bool VersionMetadata::canBeRemoved() { /// Avoid access to Transaction log if transactions are not involved + if (creation_csn.load(std::memory_order_relaxed) == Tx::RolledBackCSN) + return true; + TIDHash removal_lock = removal_tid_lock.load(std::memory_order_relaxed); if (!removal_lock) return false;