Skip to content

Desired-balance warn threshold logging should accumulate across restarts #100850

Description

@DaveCTurner

Today we emit periodic INFO logs about an ongoing desired balance computation which has not converged after some amount of time or some number of iterations:

logger.log(
reportByIterationCount || reportByTime ? Level.INFO : i % 100 == 0 ? Level.DEBUG : Level.TRACE,
() -> Strings.format(
"Desired balance computation for [%d] is still not converged after [%s] and [%d] iterations",
desiredBalanceInput.index(),
TimeValue.timeValueMillis(currentTime - computationStartedTime).toString(),
iterations
)
);

However these numbers reset if a new cluster state is received, so it's possible for a steady stream of cluster states to prevent the computation for converging without ever seeing any warnings. IMO we should let these numbers accumulate until the computation fully converges, and report the number of restarts since convergence in the log message too.

Activity

  1. added
    :Distributed/AllocationAll issues relating to the decision making around placing a shard (both master logic & on the nodes)
    SupportabilityImprove our (devs, SREs, support eng, users) ability to troubleshoot/self-service product better.
    on Oct 13, 2023
  2. elasticsearchmachine commented on Oct 13, 2023

    @elasticsearchmachine
    Collaborator

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

  3. idegtiarenko commented on Nov 3, 2023

    @idegtiarenko
    Contributor

    Related to #91386

  4. elasticsearchmachine commented on Mar 26, 2025

    @elasticsearchmachine
    Collaborator

    Pinging @elastic/es-distributed-obsolete (Team:Distributed (Obsolete))

  5. elasticsearchmachine commented on Mar 26, 2025

    @elasticsearchmachine
    Collaborator

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

  6. added 4 commits that reference this issue on Apr 1, 2025
    dfe8718
    aeb8946
    4c81fb0
    4c979aa
  7. added a commit that references this issue on Apr 9, 2025
    c3ff711
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

:Distributed/AllocationAll issues relating to the decision making around placing a shard (both master logic & on the nodes)>enhancementSupportabilityImprove our (devs, SREs, support eng, users) ability to troubleshoot/self-service product better.Team:DistributedMeta label for distributed team.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions