Fix zero-downtime reindexing docs count issue

What does this MR do?

While testing #214418 (closed) on staging I noticed that we count documents incorrectly with replicas > 0 because we used total documents count instead of primary documents count.

This MR fixes the incorrect documents count by using primaries indices stats instead of total

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Dmitry Gruzd

Merge request reports

Loading