ES 7.7.1, jdk 14.
A cluster with 3 dedicated master nodes and 100+ data nodes.
During the execution of the forcemerge, myindex/_stats and _cat/segments/myindex return different segments info.
Here is the forcemerge cmd, the ysearch6_5 is about 4GB with 1 primary shard and 0 replica before the cmd is executed.
Before the _forcemerge is done, ysearch6_5/_stats and _cat/segments/ysearch6_5 return different numbers of the segment count.
As we can see above, stats returns 2 segments of the index while _cat/segments shows about 15+ segments of the index.
I believe the _cat/segment cmd is much more precise. But why this happens? Is it as expected or just a bug?
And here is another question:
What happens if I set replica to 6 during the execution of the forcemerge? What segment files will be sent to the replica nodes?