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

Method kv

fdbclient/RYWIterator.cpp:74–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74const KeyValueRef* RYWIterator::kv(Arena& arena) {
75 if (is_unreadable() && !bypassUnreadable)
76 throw accessed_unreadable();
77
78 if (writes.is_unmodified_range()) {
79 return cache.kv(arena);
80 }
81
82 auto result = (writes.is_independent() || cache.is_empty_range())
83 ? WriteMap::coalesceUnder(writes.op(), Optional<ValueRef>(), arena)
84 : WriteMap::coalesceUnder(writes.op(), cache.kv(arena)->value, arena);
85
86 if (!result.value.present()) {
87 // Key is now deleted, which can happen because of CompareAndClear.
88 return nullptr;
89 }
90 temp = KeyValueRef(writes.beginKey().assertRef(), result.value.get());
91 return &temp;
92}
93
94RYWIterator& RYWIterator::operator++() {
95 if (end_key_cmp <= 0)

Callers 5

dumpMethod · 0.45
readMethod · 0.45
testSnapshotCacheFunction · 0.45
RYWIterator.cppFile · 0.45

Calls 8

is_unmodified_rangeMethod · 0.80
is_independentMethod · 0.80
assertRefMethod · 0.80
getMethod · 0.65
KeyValueRefClass · 0.50
is_empty_rangeMethod · 0.45
presentMethod · 0.45
beginKeyMethod · 0.45

Tested by

no test coverage detected