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

Method getCommitOverhead

fdbserver/DiskQueue.actor.cpp:945–955  ·  view source on GitHub ↗

Always commit an entire page. Commit overhead is the unused space in a to-be-committed page

Source from the content-addressed store, hash-verified

943
944 // Always commit an entire page. Commit overhead is the unused space in a to-be-committed page
945 int getCommitOverhead() const override {
946 if (!pushedPageCount()) {
947 if (!anyPopped)
948 return 0;
949
950 // To mark pages are poped, we push an empty page to specify that following pages were poped.
951 // maxPayLoad is the max. payload size, i.e., (page_size - page_header_size).
952 return Page::maxPayload;
953 } else
954 return backPage().remainingCapacity();
955 }
956
957 Future<Void> commit() override {
958 ASSERT(recovered);

Callers 2

getCommitOverheadMethod · 0.45
commitMethod · 0.45

Calls 2

pushedPageCountFunction · 0.85
remainingCapacityMethod · 0.80

Tested by

no test coverage detected