mirror of
https://github.com/didi/KnowStreaming.git
synced 2025-12-24 03:42:07 +08:00
[Optimize]Topic-Partitions增加主动超时功能 (#1076)
问题: leader=-1的分区获取offset信息时,耗时时间过久会导致前端超时,进而整个页面的数据都获取不到; 解决: 后端主动在前端超时前,对一些请求进行超时,避免导致所有的信息都没有返回给前端;
This commit is contained in:
@@ -74,7 +74,7 @@ public class TopicStateController {
|
||||
@GetMapping(value = "clusters/{clusterPhyId}/topics/{topicName}/brokers-partitions-summary")
|
||||
@ResponseBody
|
||||
public Result<TopicBrokersPartitionsSummaryVO> getTopicBrokersPartitionsSummary(@PathVariable Long clusterPhyId,
|
||||
@PathVariable String topicName) throws Exception {
|
||||
@PathVariable String topicName) {
|
||||
return topicStateManager.getTopicBrokersPartitionsSummary(clusterPhyId, topicName);
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public class TopicStateController {
|
||||
@ResponseBody
|
||||
public Result<List<TopicPartitionVO>> getTopicPartitions(@PathVariable Long clusterPhyId,
|
||||
@PathVariable String topicName,
|
||||
@RequestBody List<String> metricsNames) throws Exception {
|
||||
@RequestBody List<String> metricsNames) {
|
||||
return topicStateManager.getTopicPartitions(clusterPhyId, topicName, metricsNames);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user