Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Chore](case) pick FragmentMgr::send_filter_size.return_eof/RuntimeFilterProducer::send_size.rpc_fail to 3.0 #48819

Open
wants to merge 1 commit into
base: branch-3.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions be/src/exprs/runtime_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1188,6 +1188,11 @@ Status IRuntimeFilter::send_filter_size(RuntimeState* state, uint64_t local_filt
callback->cntl_->ignore_eovercrowded();
}

if (config::enable_debug_points &&
DebugPoints::instance()->is_enable("RuntimeFilterProducer::send_size.rpc_fail")) {
closure->cntl_->SetFailed("inject RuntimeFilterProducer::send_size.rpc_fail");
}

stub->send_filter_size(closure->cntl_.get(), closure->request_.get(), closure->response_.get(),
closure.get());
closure.release();
Expand Down
5 changes: 5 additions & 0 deletions be/src/runtime/fragment_mgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1308,6 +1308,11 @@ Status FragmentMgr::apply_filterv2(const PPublishFilterRequestV2* request,
Status FragmentMgr::send_filter_size(const PSendFilterSizeRequest* request) {
UniqueId queryid = request->query_id();

if (config::enable_debug_points &&
DebugPoints::instance()->is_enable("FragmentMgr::send_filter_size.return_eof")) {
return Status::EndOfFile("inject FragmentMgr::send_filter_size.return_eof");
}

std::shared_ptr<QueryContext> query_ctx;
{
TUniqueId query_id;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-- This file is automatically generated. You should know what you did if you want to edit this
-- !normal --
0 true

-- !rpc_failed --
0 true

-- !eof --
0 true

-- !rpc_failed --
0

-- !eof --
0

Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

suite("test_inject_send_filter_size_fail") {
sql "set parallel_pipeline_task_num=3"
sql "set enable_runtime_filter_prune=false"
sql "set enable_sync_runtime_filter_size=true"
sql "set runtime_filter_type='IN_OR_BLOOM_FILTER,MIN_MAX'"
sql "set runtime_filter_wait_infinitely=false"

sql """ drop table if exists t1; """
sql """ drop table if exists t3; """
sql """ drop table if exists t5; """

sql """
create table t1 (
k1 int null,
k2 int null
)
duplicate key (k1)
distributed BY hash(k1) buckets 16
properties("replication_num" = "1");
"""

sql """
create table t3 (
k1 int null,
k2 int null
)
duplicate key (k1)
distributed BY hash(k1) buckets 16
properties("replication_num" = "1");

"""

sql """
create table t5 (
k1 int null,
k2 int null
)
duplicate key (k1)
distributed BY hash(k1) buckets 16
properties("replication_num" = "1");
"""

sql """
insert into t1 select e1,e1 from (select 1 k1) as t lateral view explode_numbers(100000) tmp1 as e1;
"""

sql """
insert into t3 values(1,1),(2,2),(3,3);
"""

sql """
insert into t5 values(1,1),(2,2),(3,3),(4,4),(5,5);
"""

sql "analyze table t1 with sync;"
sql "analyze table t3 with sync;"
sql "analyze table t5 with sync;"

qt_normal "select count(*),sleep(2) from (select t1.k1 from t5 join [shuffle] t1 on t1.k1=t5.k1) tmp join [shuffle] t3 join t3 t3s [shuffle] on tmp.k1=t3.k1 and t3s.k1=t3.k1 where t3.k2=5;"

try {
GetDebugPoint().enableDebugPointForAllBEs("RuntimeFilterProducer::send_size.rpc_fail")
sql "set ignore_runtime_filter_error = false"
test {
sql """select count(*),sleep(2) from (select t1.k1 from t5 join [shuffle] t1 on t1.k1=t5.k1) tmp join [shuffle] t3 join t3 t3s [shuffle] on tmp.k1=t3.k1 and t3s.k1=t3.k1 where t3.k2=5;"""
exception "RPC meet failed"
}
} finally {
GetDebugPoint().disableDebugPointForAllBEs("RuntimeFilterProducer::send_size.rpc_fail")
}

try {
GetDebugPoint().enableDebugPointForAllBEs("RuntimeFilterProducer::send_size.rpc_fail")
sql "set ignore_runtime_filter_error = true"
qt_rpc_failed "select count(*),sleep(2) from (select t1.k1 from t5 join [shuffle] t1 on t1.k1=t5.k1) tmp join [shuffle] t3 join t3 t3s [shuffle] on tmp.k1=t3.k1 and t3s.k1=t3.k1 where t3.k2=5;"
} finally {
GetDebugPoint().disableDebugPointForAllBEs("RuntimeFilterProducer::send_size.rpc_fail")
}

try {
GetDebugPoint().enableDebugPointForAllBEs("FragmentMgr::send_filter_size.return_eof")
qt_eof "select count(*),sleep(2) from (select t1.k1 from t5 join [shuffle] t1 on t1.k1=t5.k1) tmp join [shuffle] t3 join t3 t3s [shuffle] on tmp.k1=t3.k1 and t3s.k1=t3.k1 where t3.k2=5;"
} finally {
GetDebugPoint().disableDebugPointForAllBEs("FragmentMgr::send_filter_size.return_eof")
}

try {
GetDebugPoint().enableDebugPointForAllBEs("RuntimeFilterProducer::send_size.rpc_fail")
sql "set ignore_runtime_filter_error = true"
qt_rpc_failed "select count(*) from (select t1.k1 from t5 join [shuffle] t1 on t1.k1=t5.k1) tmp join [shuffle] t3 join t3 t3s [shuffle] on tmp.k1=t3.k1 and t3s.k1=t3.k1 where t3.k2=5;"
} finally {
GetDebugPoint().disableDebugPointForAllBEs("RuntimeFilterProducer::send_size.rpc_fail")
}

try {
GetDebugPoint().enableDebugPointForAllBEs("FragmentMgr::send_filter_size.return_eof")
qt_eof "select count(*) from (select t1.k1 from t5 join [shuffle] t1 on t1.k1=t5.k1) tmp join [shuffle] t3 join t3 t3s [shuffle] on tmp.k1=t3.k1 and t3s.k1=t3.k1 where t3.k2=5;"
} finally {
GetDebugPoint().disableDebugPointForAllBEs("FragmentMgr::send_filter_size.return_eof")
}
}
Loading