Skip to content

Commit

Permalink
attach keyspace_id for tiflash cop/mpp requests
Browse files Browse the repository at this point in the history
Signed-off-by: iosmanthus <[email protected]>
  • Loading branch information
iosmanthus committed Feb 20, 2023
1 parent 25a5843 commit 264e1db
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion contrib/client-c
2 changes: 1 addition & 1 deletion contrib/kvproto
2 changes: 1 addition & 1 deletion dbms/src/Flash/Coprocessor/DAGStorageInterpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ std::vector<pingcap::coprocessor::CopTask> DAGStorageInterpreter::buildCopTasks(
std::multimap<std::string, std::string> meta_data;
meta_data.emplace("is_remote_read", "true");

auto tasks = pingcap::coprocessor::buildCopTasks(bo, cluster, remote_request.key_ranges, req, store_type, &Poco::Logger::get("pingcap/coprocessor"), std::move(meta_data), [&] {
auto tasks = pingcap::coprocessor::buildCopTasks(bo, cluster, remote_request.key_ranges, req, store_type, dagContext().getKeyspaceID(), &Poco::Logger::get("pingcap/coprocessor"), std::move(meta_data), [&] {
GET_METRIC(tiflash_coprocessor_request_count, type_remote_read_sent).Increment();
});
all_tasks.insert(all_tasks.end(), tasks.begin(), tasks.end());
Expand Down
4 changes: 3 additions & 1 deletion dbms/src/Storages/GCManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ bool GCManager::work()
}
if (iter == storages.end())
iter = storages.begin();
next_keyspace_table_id = iter->first;

if (iter != storages.end())

This comment has been minimized.

Copy link
@yongman

yongman Feb 21, 2023

Member

This if statement always be true, this line seems useless.

next_keyspace_table_id = iter->first;
LOG_DEBUG(log, "End GC and next gc will start with keyspace {}, table id: {}", next_keyspace_table_id.first, next_keyspace_table_id.second);
gc_check_stop_watch.restart();
// Always return false
Expand Down
1 change: 1 addition & 0 deletions dbms/src/Storages/StorageDisaggregated.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ StorageDisaggregated::RequestAndRegionIDs StorageDisaggregated::buildDispatchMPP
{
auto dispatch_req = std::make_shared<::mpp::DispatchTaskRequest>();
::mpp::TaskMeta * dispatch_req_meta = dispatch_req->mutable_meta();
dispatch_req_meta->set_keyspace_id(context.getDAGContext()->getKeyspaceID());
dispatch_req_meta->set_start_ts(sender_target_mpp_task_id.query_id.start_ts);
dispatch_req_meta->set_query_ts(sender_target_mpp_task_id.query_id.query_ts);
dispatch_req_meta->set_local_query_id(sender_target_mpp_task_id.query_id.local_query_id);
Expand Down

0 comments on commit 264e1db

Please sign in to comment.