|
Author:
{'name': 'David Percy', 'email': 'david.percy@mongodb.com', 'username': 'dpercy'}
Message: SERVER-83310 Make range_descending.js stable by adjusting distribution
The purpose of this test is to confirm correct results when we choose an
IndexScan where some fields are descending. The goal is not to confirm
that a particular plan wins.
The query we're testing has two predicates: on 'a' and 'b', and in the
example data these predicates are fully correlated. When we enabled
sampling in pairs, we make a separate estimate for 'a' and 'a ^ b'.
Because sampling is random it's possible for the 'a ^ b' estimate to be
higher than the 'a' estimate, which makes the optimizer think it's
beneficial to defer filtering on 'b' as long as possible.
This commit fixes the test by changing the data distribution so that
filtering on 'b' is always beneficial, even once we've already filtered
on 'a'. (As it turns out SERVER-82887 already included this change.)
It also improves the error messages in navigateToPath(), to disambiguate
which component of the path was missing (as in .child.child.child) and
to print the overall plan in addition to the subtree.
Branch: master
https://github.com/mongodb/mongo/commit/20514a684a85a15470b0b1f907c426ef9e415b1c
|