Skip to content

Conversation

@mhl-b
Copy link
Contributor

@mhl-b mhl-b commented Jul 23, 2025

  • Change ThreadPoolUsageCollector response from a single to list of samples.
  • Add thread-pool-name argument to ThreadPoolUsageCollector. Currently we use only write-thread-pool.
  • Rename generic NodeUsageStatsForThreadPools to specific writeThreadPoolUsages, since it's the only use case for now. There were inconsistencies when we call NodeUsageStatsForThreadPools but assumed only write-thread-pool.
  • Remove hash, equals, toString from records ThreadPoolUsage and ThreadPoolUsage.Sample.

@mhl-b mhl-b added >non-issue :Distributed Coordination/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) labels Jul 23, 2025
@mhl-b mhl-b requested a review from a team as a code owner July 23, 2025 00:10
@mhl-b mhl-b added Team:Distributed Coordination Meta label for Distributed Coordination team v9.2.0 labels Jul 23, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed-coordination (Team:Distributed Coordination)

* @param averageQueueLatency How much time tasks spend in the thread pool queue. Zero if there is nothing being queued in the write
* thread pool.
*/
public record Sample(long timeNano, int totalThreads, float averageUtilization, long averageQueueLatency) implements Writeable {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System.nanoTime() is meaningless between JVMs? better to use unix timestamp

Total threads probably shouldn't change should it? This sample is for a specific node, I don't think the thread pool sizes can change in the lifetime of a node can they?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or Instant, anyway I'm closing this PR, there are quite a few incompatible changes.

@mhl-b mhl-b closed this Jul 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed Coordination/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) >non-issue Team:Distributed Coordination Meta label for Distributed Coordination team v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants