You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Licensed to the Apache Software Foundation (ASF) under one
2
+
// or more contributor license agreements. See the NOTICE file
3
+
// distributed with this work for additional information
4
+
// regarding copyright ownership. The ASF licenses this file
5
+
// to you under the Apache License, Version 2.0 (the
6
+
// "License"); you may not use this file except in compliance
7
+
// with the License. You may obtain a copy of the License at
8
+
//
9
+
// http://www.apache.org/licenses/LICENSE-2.0
10
+
//
11
+
// Unless required by applicable law or agreed to in writing,
12
+
// software distributed under the License is distributed on an
13
+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+
// KIND, either express or implied. See the License for the
15
+
// specific language governing permissions and limitations
16
+
// under the License.
17
+
18
+
#pragma once
19
+
20
+
#include<gen_cpp/PaloInternalService_types.h>
21
+
#include<gen_cpp/Types_types.h>
22
+
23
+
#include<memory>
24
+
#include<string>
25
+
#include<utility>
26
+
27
+
#include"runtime/query_context.h"
28
+
#include"runtime_filter/runtime_filter_mgr.h"
29
+
30
+
namespacedoris {
31
+
32
+
classQueryHandle;
33
+
34
+
// The role of QueryHandle is similar to QueryContext, but its lifecycle is longer than QueryContext.
35
+
// QueryHandle will exist until the entire query ends, rather than being released as the current BE task ends like QueryContext.
36
+
// It is mainly used to store runtime states that need coordination between BEs, such as the MergeControllerHandler of RuntimeFilter.
37
+
// This way, even if the QueryContext of one BE has been released, other BEs can still access these coordination states through QueryHandle to ensure the correctness and consistency of the query.
38
+
// QueryContext hold shared_ptr of QueryHandle, and QueryHandle hold weak_ptr of QueryContext to avoid circular references.
0 commit comments