Skip to content

Commit bddbc72

Browse files
authored
Merge pull request #1254 from Altinity/backports/25.8.13/90076
25.8.13 Stable backport of ClickHouse#90076: Fix a terminate for uncaught exception
2 parents 1b721c3 + 6286937 commit bddbc72

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Common/Scheduler/SchedulerRoot.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,11 @@ class SchedulerRoot final : public ISchedulerNode
250250
}
251251

252252
Resource * current = nullptr; // round-robin pointer
253-
std::unordered_map<ISchedulerNode *, Resource> children; // resources by pointer
254253
std::atomic<bool> stop_flag = false;
255254
EventQueue events;
255+
/// Resources by pointer. Must be destroyed before the "events",
256+
/// because the descructor of ISchedulerNode might access the mutex in that queue.
257+
std::unordered_map<ISchedulerNode *, Resource> children;
256258
ThreadFromGlobalPool scheduler;
257259
};
258260

0 commit comments

Comments
 (0)