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

Method reachedBy

fdbclient/NativeAPI.actor.cpp:2732–2736  ·  view source on GitHub ↗

True if data would cause the row or byte limit to be reached

Source from the content-addressed store, hash-verified

2730
2731// True if data would cause the row or byte limit to be reached
2732bool GetRangeLimits::reachedBy(VectorRef<KeyValueRef> const& data) {
2733 return (rows != GetRangeLimits::ROW_LIMIT_UNLIMITED && data.size() >= rows) ||
2734 (bytes != GetRangeLimits::BYTE_LIMIT_UNLIMITED &&
2735 (int)data.expectedSize() + (8 - (int)sizeof(KeyValueRef)) * data.size() >= bytes && data.size() >= minRows);
2736}
2737
2738bool GetRangeLimits::hasByteLimit() {
2739 return bytes != GetRangeLimits::BYTE_LIMIT_UNLIMITED;

Callers 2

memoryGetRangeMethod · 0.80

Calls 2

sizeMethod · 0.45
expectedSizeMethod · 0.45

Tested by

no test coverage detected