-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(mango
): add keys_examined
for execution_stats
#4569
feat(mango
): add keys_examined
for execution_stats
#4569
Conversation
98d47bc
to
92febd4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Well done!
See a tiny stile nit and a question about adding an upgrade comment
604beef
to
20eabcb
Compare
Please do not merge this now, I would like to do some refactoring (move the process dictionary function under |
2e0d2f9
to
583e396
Compare
OK -- the planned changes are there. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, @pgj! Thanks for moving the process dictionary manipulation to a dedicated module. I left a minor nit on assigning variables within a case statement, but otherwise looks good to me.
583e396
to
3ecd6a1
Compare
3ecd6a1
to
c39bd1d
Compare
Add another field to the shard-level Mango execution statistics to keep track of the count of keys that were examined for the query. Note that this requires to change the way how stats are stored -- an approach similar to that of the view callback arguments was chosen, which features a map. This current version supports both the old and new formats. The coordinator may request getting the results in the new one by adding `execution_stats_map` for the arguments of the view callback. Otherwise the old format is used (without the extra field), which makes it possible to work with older coordinators. Old workers will automatically ignore this argument and answer in the old format.
c39bd1d
to
2351468
Compare
Add another field to the shard-level Mango execution statistics to keep track of the count of keys that were examined for the query. Note that this requires to change the way how stats are stored -- an approach similar to that of the view callback arguments was chosen, which features a map (#4394).
The change in the format also implies a potential incompatibility between different version of nodes, which may happen for mixed-version clusters. This is handled by introducing an additional option for the view callback where the coordinator can request for the results in the new format and the old format is still recognized. It helps to handle version differences automatically therefore no specific configuration option is required to control the migration. Thanks @rnewson for the idea.
This is related to the covering indexes work and takes inspiration from earlier works of @mikerhodes , see #4410 and #4413 for the details.
Note that slight increase in unit test coverage for
mango_execution_stats
due to the implicit testing viamango_cursor_view
. The only missing part isincr_docs_examined/1
but that is not used from there, only frommango_cursor_text
andmango_cursor_nouveau
.$ make eunit apps=mango
before:
after:
Checklist