inherit readOptions passed from FetchKeys
This commit is contained in:
parent
4312a640ae
commit
e69e93496b
|
@ -4311,8 +4311,6 @@ Future<RangeResultFamily> getRange(Reference<TransactionState> trState,
|
|||
setMatchIndex<GetKeyValuesFamilyRequest>(req, matchIndex);
|
||||
req.tenantInfo = useTenant ? trState->getTenantInfo() : TenantInfo();
|
||||
req.options = trState->readOptions;
|
||||
// Don't cache for fetch
|
||||
req.options.cacheResult = (req.options.type != ReadType::FETCH);
|
||||
req.version = readVersion;
|
||||
|
||||
trState->cx->getLatestCommitVersions(
|
||||
|
@ -4765,11 +4763,8 @@ ACTOR Future<Void> getRangeStreamFragment(Reference<TransactionState> trState,
|
|||
req.spanContext = spanContext;
|
||||
req.limit = reverse ? -CLIENT_KNOBS->REPLY_BYTE_LIMIT : CLIENT_KNOBS->REPLY_BYTE_LIMIT;
|
||||
req.limitBytes = std::numeric_limits<int>::max();
|
||||
// leaving the flag off for now to prevent data fetches stall under heavy load
|
||||
// it is used to inform the storage that the rangeRead is for Fetch
|
||||
// TODO: update to FETCH once the priority multi lock is used.
|
||||
|
||||
req.options = trState->readOptions;
|
||||
req.options.type = ReadType::NORMAL;
|
||||
|
||||
trState->cx->getLatestCommitVersions(
|
||||
locations[shard].locations, req.version, trState, req.ssLatestCommitVersions);
|
||||
|
|
|
@ -10994,7 +10994,7 @@ ACTOR Future<Void> randomRangeScans(IKeyValueStore* kvs,
|
|||
int recordCountTarget,
|
||||
bool singlePrefix,
|
||||
int rowLimit,
|
||||
int bitLimit,
|
||||
int byteLimit,
|
||||
ReadOptions options = ReadOptions()) {
|
||||
fmt::print("\nstoreType: {}\n", static_cast<int>(kvs->getType()));
|
||||
fmt::print("prefixSource: {}\n", source.toString());
|
||||
|
@ -11028,7 +11028,7 @@ ACTOR Future<Void> randomRangeScans(IKeyValueStore* kvs,
|
|||
KeyRangeRef range = source.getKeyRangeRef(singlePrefix, suffixSize);
|
||||
int rowLim = (deterministicRandom()->randomInt(0, 2) != 0) ? rowLimit : -rowLimit;
|
||||
|
||||
RangeResult result = wait(kvs->readRange(range, rowLim, bitLimit, options));
|
||||
RangeResult result = wait(kvs->readRange(range, rowLim, byteLimit, options));
|
||||
|
||||
recordsRead += result.size();
|
||||
bytesRead += result.size() * recordSize;
|
||||
|
|
|
@ -2489,7 +2489,8 @@ ACTOR Future<std::pair<ChangeFeedStreamReply, bool>> getChangeFeedMutations(Stor
|
|||
state int remainingLimitBytes = CLIENT_KNOBS->REPLY_BYTE_LIMIT;
|
||||
state int remainingDurableBytes = CLIENT_KNOBS->REPLY_BYTE_LIMIT;
|
||||
state Version startVersion = data->version.get();
|
||||
// TODO: Change feed reads should probably at least set cacheResult to false, possibly set a different ReadType as well, perhaps high priority?
|
||||
// TODO: Change feed reads should probably at least set cacheResult to false, possibly set a different ReadType as
|
||||
// well, perhaps high priority?
|
||||
state ReadOptions options;
|
||||
|
||||
if (DEBUG_CF_TRACE) {
|
||||
|
@ -6375,7 +6376,11 @@ ACTOR Future<Void> fetchKeys(StorageServer* data, AddingShard* shard) {
|
|||
shard->updates.pop_front();
|
||||
tr.setVersion(fetchVersion);
|
||||
tr.trState->taskID = TaskPriority::FetchKeys;
|
||||
tr.trState->readOptions.type = ReadType::FETCH;
|
||||
// TODO: update to FETCH once the priority multi lock is used.
|
||||
// leaving the readtype off for now to prevent data fetches stall under heavy load
|
||||
// it is used to inform the storage that the rangeRead is for Fetch
|
||||
// tr.trState->readOptions.type = ReadType::FETCH;
|
||||
tr.trState->readOptions.type = ReadType::NORMAL;
|
||||
tr.trState->readOptions.cacheResult = false;
|
||||
state PromiseStream<RangeResult> results;
|
||||
state Future<Void> hold = SERVER_KNOBS->FETCH_USING_STREAMING
|
||||
|
|
Loading…
Reference in New Issue