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

Function comparePages

fdbserver/DiskQueue.actor.cpp:1531–1535  ·  view source on GitHub ↗

isValid(firstPage) == compare(firstPage, firstPage) isValid(otherPage) == compare(firstPage, otherPage) Swap file1, file2 if comparePages( file2.firstPage, file1.firstPage )

Source from the content-addressed store, hash-verified

1529 // isValid(otherPage) == compare(firstPage, otherPage)
1530 // Swap file1, file2 if comparePages( file2.firstPage, file1.firstPage )
1531 static bool comparePages(void* v1, void* v2) {
1532 Page* p1 = (Page*)v1;
1533 Page* p2 = (Page*)v2;
1534 return p2->checkHash() && (p2->seq >= p1->seq || !p1->checkHash());
1535 }
1536
1537 RawDiskQueue_TwoFiles* rawQueue;
1538 UID dbgid;

Callers

nothing calls this directly

Calls 1

checkHashMethod · 0.80

Tested by

no test coverage detected