Skip to content

Commit cd1835d

Browse files
committed
fix: do not remove session tx id if txMeta empty.
Signed-off-by: Vladislav Polyakov <[email protected]>
1 parent bc041c3 commit cd1835d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/query/query-session-execute.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,13 @@ export function execute(this: QuerySession, args: IExecuteArgs): Promise<IExecut
195195
try {
196196
ensureCallSucceeded(partialResp);
197197
} catch (ydbErr) {
198+
delete this[sessionTxIdSymbol]
199+
198200
return cancel(ydbErr);
199201
}
200202

201203
if (partialResp.txMeta?.id)
202204
this[sessionTxIdSymbol] = partialResp.txMeta!.id;
203-
else
204-
delete this[sessionTxIdSymbol];
205205

206206
if (partialResp.resultSet) {
207207

0 commit comments

Comments
 (0)