aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnaury <snaury@ydb.tech>2023-04-05 12:30:05 +0300
committersnaury <snaury@ydb.tech>2023-04-05 12:30:05 +0300
commitddf13bed0be3a06ad5dce73428676112c0c49844 (patch)
tree2fb0a8cad32ef12a3e6b2f26e780f2274c7691a9
parent62313317a2f104c74ea46ba84bfb6c8c9dac24f6 (diff)
downloadydb-ddf13bed0be3a06ad5dce73428676112c0c49844.tar.gz
Don't fail reads when shard doesn't know its own schema version
-rw-r--r--ydb/core/tx/datashard/datashard__read_iterator.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/ydb/core/tx/datashard/datashard__read_iterator.cpp b/ydb/core/tx/datashard/datashard__read_iterator.cpp
index f1cdf374f4e..e65eddd7e11 100644
--- a/ydb/core/tx/datashard/datashard__read_iterator.cpp
+++ b/ydb/core/tx/datashard/datashard__read_iterator.cpp
@@ -1263,7 +1263,9 @@ public:
state.SchemaVersion = userTableInfo->GetTableSchemaVersion();
if (record.GetTableId().HasSchemaVersion()) {
- if (state.SchemaVersion != record.GetTableId().GetSchemaVersion()) {
+ if (state.SchemaVersion != 0 &&
+ state.SchemaVersion != record.GetTableId().GetSchemaVersion())
+ {
SetStatusError(
Result->Record,
Ydb::StatusIds::SCHEME_ERROR,