diff --git a/contrib/client-c b/contrib/client-c index b4ab3efa024..b2a6ce6e678 160000 --- a/contrib/client-c +++ b/contrib/client-c @@ -1 +1 @@ -Subproject commit b4ab3efa024386ad028876907bdbab682cc2f2b3 +Subproject commit b2a6ce6e6786cfbbc9fa26942b66eb043b2f7960 diff --git a/contrib/kvproto b/contrib/kvproto index 579d6ab1bff..c6df78cc9de 160000 --- a/contrib/kvproto +++ b/contrib/kvproto @@ -1 +1 @@ -Subproject commit 579d6ab1bfffd5e5ca71436dff59bcb5843188c4 +Subproject commit c6df78cc9dea61bdf913ec8bac49e245980c1a94 diff --git a/dbms/src/Flash/Coprocessor/DAGStorageInterpreter.cpp b/dbms/src/Flash/Coprocessor/DAGStorageInterpreter.cpp index 0819463deb9..34541b4a645 100644 --- a/dbms/src/Flash/Coprocessor/DAGStorageInterpreter.cpp +++ b/dbms/src/Flash/Coprocessor/DAGStorageInterpreter.cpp @@ -445,7 +445,7 @@ std::vector DAGStorageInterpreter::buildCopTasks( std::multimap 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()); diff --git a/dbms/src/Storages/GCManager.cpp b/dbms/src/Storages/GCManager.cpp index eea5db3d22a..dc17308ff97 100644 --- a/dbms/src/Storages/GCManager.cpp +++ b/dbms/src/Storages/GCManager.cpp @@ -97,7 +97,9 @@ bool GCManager::work() } if (iter == storages.end()) iter = storages.begin(); - next_keyspace_table_id = iter->first; + + if (iter != storages.end()) + 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 diff --git a/dbms/src/Storages/StorageDisaggregated.cpp b/dbms/src/Storages/StorageDisaggregated.cpp index 0f4ac2bec7f..2dcd3b3139b 100644 --- a/dbms/src/Storages/StorageDisaggregated.cpp +++ b/dbms/src/Storages/StorageDisaggregated.cpp @@ -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);