| 3839 | |
| 3840 | template <class GetKeyValuesFamilyRequest> |
| 3841 | void transformRangeLimits(GetRangeLimits limits, Reverse reverse, GetKeyValuesFamilyRequest& req) { |
| 3842 | if (limits.bytes != 0) { |
| 3843 | if (!limits.hasRowLimit()) |
| 3844 | req.limit = CLIENT_KNOBS->REPLY_BYTE_LIMIT; // Can't get more than this many rows anyway |
| 3845 | else |
| 3846 | req.limit = std::min(CLIENT_KNOBS->REPLY_BYTE_LIMIT, limits.rows); |
| 3847 | |
| 3848 | if (reverse) |
| 3849 | req.limit *= -1; |
| 3850 | |
| 3851 | if (!limits.hasByteLimit()) |
| 3852 | req.limitBytes = CLIENT_KNOBS->REPLY_BYTE_LIMIT; |
| 3853 | else |
| 3854 | req.limitBytes = std::min(CLIENT_KNOBS->REPLY_BYTE_LIMIT, limits.bytes); |
| 3855 | } else { |
| 3856 | req.limitBytes = CLIENT_KNOBS->REPLY_BYTE_LIMIT; |
| 3857 | req.limit = reverse ? -limits.minRows : limits.minRows; |
| 3858 | } |
| 3859 | } |
| 3860 | |
| 3861 | template <class GetKeyValuesFamilyRequest> |
| 3862 | PublicRequestStream<GetKeyValuesFamilyRequest> StorageServerInterface::*getRangeRequestStream() { |
no test coverage detected