Skip to content

Commit

Permalink
[fix][coordinator] Fix GetSchemaByName.
Browse files Browse the repository at this point in the history
Signed-off-by: Ketor <d.ketor@gmail.com>
  • Loading branch information
ketor authored and astor-oss committed Mar 7, 2024
1 parent b10daa2 commit 8ff0279
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/client/coordinator_client_function_meta.cc
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ void SendGetSchemaByName(std::shared_ptr<dingodb::CoordinatorInteraction> coordi
request.set_tenant_id(FLAGS_tenant_id);
}

DINGO_LOG(INFO) << "SendRequest: " << request.DebugString();

auto status = coordinator_interaction->SendRequest("GetSchemaByName", request, response);
DINGO_LOG(INFO) << "SendRequest status=" << status;
DINGO_LOG(INFO) << response.DebugString();
Expand Down
5 changes: 3 additions & 2 deletions src/coordinator/coordinator_control_fsm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ void CoordinatorControl::BuildTempMaps() {
butil::FlatMap<int64_t, pb::coordinator_internal::SchemaInternal> schema_map_copy;
schema_map_copy.init(10000);
schema_map_.GetRawMapCopy(schema_map_copy);
for (const auto& it : schema_map_copy) {
schema_name_map_safe_temp_.Put(it.second.name(), it.first);
for (const auto& [schema_id, schema_internal] : schema_map_copy) {
auto new_check_name = Helper::GenNewTenantCheckName(schema_internal.tenant_id(), schema_internal.name());
schema_name_map_safe_temp_.Put(new_check_name, schema_id);
}
}
DINGO_LOG(INFO) << "schema_name_map_safe_temp, count=" << schema_name_map_safe_temp_.Size();
Expand Down

0 comments on commit 8ff0279

Please sign in to comment.