diff options
| author | Artem Zuikov <[email protected]> | 2022-04-22 20:57:30 +0300 |
|---|---|---|
| committer | Artem Zuikov <[email protected]> | 2022-04-22 20:57:30 +0300 |
| commit | 48483975556d6a34d609c110a9578789d557fb35 (patch) | |
| tree | 2aa8a3e4e287aad0e716dd16d58459b34506a054 | |
| parent | 51503e219ac6ca769dbcb1e1a6f14ccffde9273d (diff) | |
KIKIMR-14773: prevent remove proposed writes at ColumnShard
ref:37b432b33bc01fe0b282b2a6ecf1a30b80c10329
| -rw-r--r-- | ydb/core/tx/columnshard/columnshard__progress_tx.cpp | 2 | ||||
| -rw-r--r-- | ydb/core/tx/columnshard/columnshard_impl.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/ydb/core/tx/columnshard/columnshard__progress_tx.cpp b/ydb/core/tx/columnshard/columnshard__progress_tx.cpp index 53abef0d31e..c3ddf59b4a8 100644 --- a/ydb/core/tx/columnshard/columnshard__progress_tx.cpp +++ b/ydb/core/tx/columnshard/columnshard__progress_tx.cpp @@ -91,7 +91,7 @@ public: if (meta.MetaShard == 0) { for (TWriteId writeId : meta.WriteIds) { - Self->RemoveLongTxWrite(db, writeId); + Self->RemoveLongTxWrite(db, writeId, txId); } } Self->CommitsInFlight.erase(txId); diff --git a/ydb/core/tx/columnshard/columnshard_impl.cpp b/ydb/core/tx/columnshard/columnshard_impl.cpp index f0ad337377a..8d5171e121c 100644 --- a/ydb/core/tx/columnshard/columnshard_impl.cpp +++ b/ydb/core/tx/columnshard/columnshard_impl.cpp @@ -223,7 +223,8 @@ void TColumnShard::LoadLongTxWrite(TWriteId writeId, const NLongTxService::TLong void TColumnShard::RemoveLongTxWrite(NIceDb::TNiceDb& db, TWriteId writeId, ui64 txId) { if (auto* lw = LongTxWrites.FindPtr(writeId)) { - if (!txId || lw->PreparedTxId == txId) { + ui64 prepared = lw->PreparedTxId; + if (!prepared || txId == prepared) { Schema::EraseLongTxWrite(db, writeId); LongTxWritesByUniqueId.erase(lw->LongTxId.UniqueId); LongTxWrites.erase(writeId); |
