Details
-
Bug
-
Resolution: Unresolved
-
Critical
-
7.6.0
-
None
-
Untriaged
-
0
-
Unknown
Description
This is a minor performance optimisation pointed out by Sai Krishna Teja .
In moveIndexesIfNecessary, if indexes belonging to the same alternateShardId are spread across multiple nodes, then the indexes will be moved to the node with maximum indexes. This is done to reduce index movements during rebalance.
However, if the destination node has mode indexes which require DCP builds (i.e. replica repair), then in such case this logic becomes invalid. E.g., node n1 has 3 indexes requiring repair and node 2 has only 2 indexes that does not require repair, then currently, indexes from n2 will move to n3. This can potentially lead to 5 DCP rebuilds.
This can be optimised so that indexes from n3 will move to n2 even if n3 has more indexes.