Reverse range reads on the storage server would not pass the specified byte limit to the storage engine but would apply it to the results returned, causing a potentially significant amount of wasted reading.
This commit is contained in:
parent
3f9ff9b209
commit
f32d515fda
|
@ -1238,7 +1238,7 @@ ACTOR Future<GetKeyValuesReply> readRange( StorageServer* data, Version version,
|
||||||
if (vEnd)
|
if (vEnd)
|
||||||
readBegin = std::max( readBegin, vEnd->isClearTo() ? vEnd->getEndKey() : vEnd.key() );
|
readBegin = std::max( readBegin, vEnd->isClearTo() ? vEnd->getEndKey() : vEnd.key() );
|
||||||
|
|
||||||
Standalone<VectorRef<KeyValueRef>> atStorageVersion = wait( data->storage.readRange( KeyRangeRef(readBegin, readEnd), limit ) );
|
Standalone<VectorRef<KeyValueRef>> atStorageVersion = wait( data->storage.readRange( KeyRangeRef(readBegin, readEnd), limit, *pLimitBytes ) );
|
||||||
if (data->storageVersion() > version) throw transaction_too_old();
|
if (data->storageVersion() > version) throw transaction_too_old();
|
||||||
|
|
||||||
int prevSize = result.data.size();
|
int prevSize = result.data.size();
|
||||||
|
|
Loading…
Reference in New Issue