elastic/elasticsearch

Record shard movements over time

Open

#60,747 opened on Aug 5, 2020

View on GitHub
 (7 comments) (3 reactions) (1 assignee)Java (25,882 forks)batch import
:Distributed/Allocation>enhancementTeam:Distributedhelp wanted

Repository metrics

Stars
 (76,700 stars)
PR merge metrics
 (Avg merge 2d) (1,000 merged PRs in 30d)

Description

Sometimes it is useful to know how shards have moved around the cluster on the way to their current locations. Today there is no simple way to obtain this information, even with DEBUG-level logging. We (the @elastic/es-distributed team) discussed this today and we propose introducing a new logger for shard movements in order to expose this information in the logs. This need only look at the cluster state and therefore runs only on the elected master, and should log shard-by-shard changes to the routing table.

I'm marking this as help wanted to invite external contributions since this isn't a priority for us right now, but note that it may not be a straightforward task to implement this correctly and efficiently.

Contributor guide