Always commit an entire page. Commit overhead is the unused space in a to-be-committed page
| 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); |
no test coverage detected