| 5457 | |
| 5458 | template <class GetKeyValuesFamilyRequest, class GetKeyValuesFamilyReply, class RangeResultFamily> |
| 5459 | Future<RangeResultFamily> Transaction::getRangeInternal(const KeySelector& begin, |
| 5460 | const KeySelector& end, |
| 5461 | const Key& mapper, |
| 5462 | GetRangeLimits limits, |
| 5463 | int matchIndex, |
| 5464 | Snapshot snapshot, |
| 5465 | Reverse reverse) { |
| 5466 | ++trState->cx->transactionLogicalReads; |
| 5467 | increaseCounterForRequest<GetKeyValuesFamilyRequest>(trState->cx); |
| 5468 | |
| 5469 | if (limits.isReached()) |
| 5470 | return RangeResultFamily(); |
| 5471 | |
| 5472 | if (!limits.isValid()) |
| 5473 | return range_limits_invalid(); |
| 5474 | |
| 5475 | ASSERT(limits.rows != 0); |
| 5476 | |
| 5477 | KeySelector b = begin; |
| 5478 | if (b.orEqual) { |
| 5479 | CODE_PROBE(true, "Native begin orEqual==true"); |
| 5480 | b.removeOrEqual(b.arena()); |
| 5481 | } |
| 5482 | |
| 5483 | KeySelector e = end; |
| 5484 | if (e.orEqual) { |
| 5485 | CODE_PROBE(true, "Native end orEqual==true"); |
| 5486 | e.removeOrEqual(e.arena()); |
| 5487 | } |
| 5488 | |
| 5489 | if (b.offset >= e.offset && b.getKey() >= e.getKey()) { |
| 5490 | CODE_PROBE(true, "Native range inverted"); |
| 5491 | return RangeResultFamily(); |
| 5492 | } |
| 5493 | |
| 5494 | if (!snapshot && !std::is_same_v<GetKeyValuesFamilyRequest, GetKeyValuesRequest>) { |
| 5495 | // Currently, NativeAPI does not support serialization for getMappedRange. You should consider use |
| 5496 | // ReadYourWrites APIs which wraps around NativeAPI and provides serialization for getMappedRange. (Even if |
| 5497 | // you don't want RYW, you may use ReadYourWrites APIs with RYW disabled.) |
| 5498 | throw unsupported_operation(); |
| 5499 | } |
| 5500 | Promise<std::pair<Key, Key>> conflictRange; |
| 5501 | if (!snapshot) { |
| 5502 | extraConflictRanges.push_back(conflictRange.getFuture()); |
| 5503 | } |
| 5504 | |
| 5505 | return ::getRange<GetKeyValuesFamilyRequest, GetKeyValuesFamilyReply, RangeResultFamily>( |
| 5506 | trState, getReadVersion(), b, e, mapper, limits, conflictRange, matchIndex, snapshot, reverse); |
| 5507 | } |
| 5508 | |
| 5509 | Future<RangeResult> Transaction::getRange(const KeySelector& begin, |
| 5510 | const KeySelector& end, |
nothing calls this directly
no test coverage detected