Skip to content

Commit dbf26c5

Browse files
authored
Fix bug with GetShardsCount() == 0 (#14812)
1 parent b52dd35 commit dbf26c5

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)