fix(mango
): communicate rows read for global stats collection
#4908
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Besides the execution statistics that could be shown for the user, the number of rows and documents read are tracked separately on the global level. (Which is more like a bug than a feature, but that is out of the scope of this change.)
With the introduction of covering indexes, these two have been become different, therefore global counting has to be taught about the number of times when no documents were read but rows only. For
text
indexes, the number of rows and documents should be the same, the distinction makes sense only forjson
indexes.Testing recommendations
The changes are covered by the respective portion of the tests:
The global stats should always report the same values as it is added for the (Mango) execution stats.
Checklist