Skip to content

Commit

Permalink
Troubleshooting.
Browse files Browse the repository at this point in the history
Signed-off-by: AWSHurneyt <[email protected]>
  • Loading branch information
AWSHurneyt committed Feb 5, 2024
1 parent 2622aaf commit 6af76f0
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,21 +129,22 @@ class InputService(
if (remoteMonitoringEnabled && input.clusters.isNotEmpty()) {
val responseMap = mutableMapOf<String, Map<String, Any>>()
client.threadPool().threadContext.stashContext().use {
input.clusters.forEach { cluster ->
scope.launch {
scope.launch {
// val singleThreadContext = newSingleThreadContext("ClusterMetricsInputThread")
// withContext(singleThreadContext) {
//
// }
input.clusters.forEach { cluster ->
val targetClient = CrossClusterMonitorUtils.getClientForCluster(cluster, client, clusterService)
val response = executeTransportAction(input, targetClient)
// Not all supported API reference the cluster name in their response.
// Mapping each response to the cluster name before adding to results.
// Not adding this same logic for local-only monitors to avoid breaking existing monitors.
responseMap[cluster] = response.toMap()

}
results += responseMap
}
results += responseMap
}
// todo hurneyt delete?
// while (responseMap.size < input.clusters.size) {
Expand Down

0 comments on commit 6af76f0

Please sign in to comment.