Skip to content

Commit 52036f9

Browse files
dahbka-lisblinkov
authored andcommitted
Fix bug with GetShardsCount() == 0 (#14812)
1 parent 1550621 commit 52036f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ydb/core/kqp/common/kqp_tx_manager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ class TKqpTransactionManager : public IKqpTransactionManager {
280280
}
281281

282282
bool NeedCommit() const override {
283-
const bool dontNeedCommit = IsReadOnly() && (IsSingleShard() || HasSnapshot());
283+
const bool dontNeedCommit = IsEmpty() || IsReadOnly() && (IsSingleShard() || HasSnapshot());
284284
return !dontNeedCommit;
285285
}
286286

0 commit comments

Comments
 (0)