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

[Fix](exectutor)Fix topicPublisher thread may NPE when no topic exists #29306

Merged
merged 1 commit into from
Dec 29, 2023
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,8 @@ protected void runAfterCatalogReady() {
topicPublisher.getTopicInfo(request);
}

if (request.getTopicMap().size() == 0) {
return;
}
// even request contains no group and schedule policy, we still need to send an empty rpc.
// because it may means workload group/policy is dropped

// step 2: publish topic info to all be
Collection<Backend> nodesToPublish = clusterInfoService.getIdToBackend().values();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ public WorkloadGroupPublisher(Env env) {
@Override
public void getTopicInfo(TPublishTopicRequest req) {
List<TopicInfo> list = env.getWorkloadGroupMgr().getPublishTopicInfo();
if (list.size() > 0) {
req.putToTopicMap(TTopicInfoType.WORKLOAD_GROUP, list);
}
req.putToTopicMap(TTopicInfoType.WORKLOAD_GROUP, list);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ public WorkloadSchedPolicyPublisher(Env env) {
@Override
public void getTopicInfo(TPublishTopicRequest req) {
List<TopicInfo> list = env.getWorkloadSchedPolicyMgr().getPublishTopicInfoList();
if (list.size() > 0) {
req.putToTopicMap(TTopicInfoType.WORKLOAD_SCHED_POLICY, list);
}
req.putToTopicMap(TTopicInfoType.WORKLOAD_SCHED_POLICY, list);
}

}
Loading