Skip to content

Commit 0765901

Browse files
[BugFix] Fix QueryContextManager clear_thread crash (backport #50459) (#56571)
Co-authored-by: stdpain <[email protected]>
1 parent 9c80bdc commit 0765901

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

be/src/exec/pipeline/query_context.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,8 @@ QueryContext* QueryContextManager::get_or_register(const TUniqueId& query_id) {
381381
// lookup query context for the second chance in sc_map
382382
if (sc_it != sc_map.end()) {
383383
auto ctx = std::move(sc_it->second);
384-
RETURN_NULL_IF_CTX_CANCELLED(ctx);
385384
sc_map.erase(sc_it);
385+
RETURN_NULL_IF_CTX_CANCELLED(ctx);
386386
auto* raw_ctx_ptr = ctx.get();
387387
context_map.emplace(query_id, std::move(ctx));
388388
return raw_ctx_ptr;

0 commit comments

Comments
 (0)