Method uses std::upper_bound to find the first boundary after the input keystring.
If the input is MaxKey, the returned iterator is end().
auto it = std::upper_bound(_boundaries.begin(), _boundaries.end(), keyStr); invariant(it != _boundaries.end());
This is not a failure, and the final consumer should be inclusive of MaxKey.
- related to
-
SERVER-126803 Use internal client+writeConcern in exchange_keyrange_maxkey.js
-
- In Code Review
-