Skip to content

Commit f19d75e

Browse files
Backport #93029 to 25.10: Fix leaving connection in a broken state after preliminary cancellation distributed queries
1 parent eeeef90 commit f19d75e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/QueryPipeline/RemoteQueryExecutor.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -778,9 +778,6 @@ void RemoteQueryExecutor::finish()
778778
{
779779
LockAndBlocker guard(was_cancelled_mutex);
780780

781-
/// To make sure finish is only called once
782-
SCOPE_EXIT({ finished = true; });
783-
784781
/** If one of:
785782
* - nothing started to do;
786783
* - received all packets before EndOfStream;
@@ -791,6 +788,9 @@ void RemoteQueryExecutor::finish()
791788
if (!isQueryPending() || hasThrownException())
792789
return;
793790

791+
/// To make sure finish is only called once
792+
SCOPE_EXIT({ finished = true; });
793+
794794
/** If you have not read all the data yet, but they are no longer needed.
795795
* This may be due to the fact that the data is sufficient (for example, when using LIMIT).
796796
*/

0 commit comments

Comments
 (0)