aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorivanmorozov <ivanmorozov@yandex-team.com>2023-10-19 12:30:50 +0300
committerivanmorozov <ivanmorozov@yandex-team.com>2023-10-19 12:58:17 +0300
commit5069000ecf39052857cfe1d5604bc43968a173c8 (patch)
tree1baf19ca290e8564639ca003d999800e2b89be3b
parent71849fca8822e8ffce141da290c31b08eeaa23f1 (diff)
downloadydb-5069000ecf39052857cfe1d5604bc43968a173c8.tar.gz
KIKIMR-19745: add validation between transactions
-rw-r--r--ydb/core/tx/columnshard/columnshard__write.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/ydb/core/tx/columnshard/columnshard__write.cpp b/ydb/core/tx/columnshard/columnshard__write.cpp
index c3857484a8..b8e87f5d9b 100644
--- a/ydb/core/tx/columnshard/columnshard__write.cpp
+++ b/ydb/core/tx/columnshard/columnshard__write.cpp
@@ -56,6 +56,16 @@ void TColumnShard::Handle(TEvPrivate::TEvWriteBlobsResult::TPtr& ev, const TActo
OnYellowChannels(putResult);
const auto& writeMeta = ev->Get()->GetWriteMeta();
+ if (!TablesManager.IsReadyForWrite(writeMeta.GetTableId())) {
+ AFL_ERROR(NKikimrServices::TX_COLUMNSHARD)("event", "absent_pathId")("path_id", writeMeta.GetTableId())("has_index", TablesManager.HasPrimaryIndex());
+ IncCounter(COUNTER_WRITE_FAIL);
+
+ auto result = std::make_unique<TEvColumnShard::TEvWriteResult>(TabletID(), writeMeta, NKikimrTxColumnShard::EResultStatus::ERROR);
+ ctx.Send(writeMeta.GetSource(), result.release());
+ CSCounters.OnFailedWriteResponse();
+ return;
+ }
+
auto wg = WritesMonitor.FinishWrite(putResult.GetResourceUsage().SourceMemorySize);
if (putResult.GetPutStatus() != NKikimrProto::OK) {