Fix a memory issue when getting key range locations that manifests in particular when getting range split points

This commit is contained in:
A.J. Beamon 2023-01-23 11:01:37 -08:00
parent 95db42a28a
commit adb8d3ec7a
1 changed files with 6 additions and 2 deletions

View File

@ -3015,7 +3015,9 @@ Future<KeyRangeLocationInfo> getKeyLocation(Reference<TransactionState> trState,
trState->readOptions.present() ? trState->readOptions.get().debugID : Optional<UID>(),
trState->useProvisionalProxies,
isBackward,
trState->readVersionFuture.isReady() ? trState->readVersion() : latestVersion);
trState->readVersionFuture.isValid() && trState->readVersionFuture.isReady()
? trState->readVersion()
: latestVersion);
}
ACTOR Future<std::vector<KeyRangeLocationInfo>> getKeyRangeLocations_internal(
@ -3132,7 +3134,9 @@ Future<std::vector<KeyRangeLocationInfo>> getKeyRangeLocations(Reference<Transac
trState->spanContext,
trState->readOptions.present() ? trState->readOptions.get().debugID : Optional<UID>(),
trState->useProvisionalProxies,
trState->readVersionFuture.isReady() ? trState->readVersion() : latestVersion);
trState->readVersionFuture.isValid() && trState->readVersionFuture.isReady()
? trState->readVersion()
: latestVersion);
}
ACTOR Future<Void> warmRange_impl(Reference<TransactionState> trState, KeyRange keys) {