MCPcopy Create free account
hub / github.com/apple/foundationdb / transformRangeLimits

Function transformRangeLimits

fdbclient/NativeAPI.actor.cpp:3841–3859  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3839
3840template <class GetKeyValuesFamilyRequest>
3841void 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
3861template <class GetKeyValuesFamilyRequest>
3862PublicRequestStream<GetKeyValuesFamilyRequest> StorageServerInterface::*getRangeRequestStream() {

Calls 2

hasRowLimitMethod · 0.80
hasByteLimitMethod · 0.80

Tested by

no test coverage detected