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

Function append

fdbclient/include/fdbclient/VersionedMap.h:454–471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

452
453template <class T>
454Reference<PTree<T>> append(const Reference<PTree<T>>& left, const Reference<PTree<T>>& right, Version at) {
455 if (!left)
456 return right;
457 if (!right)
458 return left;
459
460 Reference<PTree<T>> r = makeReference<PTree<T>>(lastNode(left, at)->data, at);
461 if (EXPENSIVE_VALIDATION) {
462 ASSERT(r->data < firstNode(right, at)->data);
463 }
464 Reference<PTree<T>> a = left;
465 remove(a, at, r->data);
466
467 r->pointer[0] = a;
468 r->pointer[1] = right;
469 demoteRoot(r, at);
470 return r;
471}
472
473template <class T, class X>
474void split(Reference<PTree<T>> p, const X& x, Reference<PTree<T>>& left, Reference<PTree<T>>& right, Version at) {

Callers 15

VectorRefMethod · 0.85
SmallVectorRefMethod · 0.85
appendMethod · 0.85
getKmsUrlsFunction · 0.85
TestFaultInjectionFunction · 0.85
updateLocFaultStatusesFunction · 0.85
appendMethod · 0.85
prependMethod · 0.85
insertMethod · 0.85
acceptConfigurationMethod · 0.85

Calls 4

lastNodeFunction · 0.85
firstNodeFunction · 0.85
demoteRootFunction · 0.85
removeFunction · 0.70

Tested by 1

TestFaultInjectionFunction · 0.68