Given a list of targeted shard ids, return the logical time to be used as the atClusterTime value that will be included in the commands sent to all the shards. This will be the max lastCommittedOpTimes of the given shards, found by looking up each shard in the shard registry and then calling getLastCommittedOpTime(). Since this logic will be shared by read commands, it should be put into a file of helper functions, like src/mongo/s/commands_helpers.cpp.
- What to return if given an empty list of shard ids?
- it doesn't seem like this is possible, so invariant?
- Mock a shardRegistry with several shards, set lastCommittedOpTimes on each shard, and verify that computeAtClusterTime returns the highest time.