Skip to content

Conversation

1036-ce
Copy link
Contributor

@1036-ce 1036-ce commented May 19, 2025

What problem were solved in this pull request?

Issue Number: close #563

Problem:

What is changed and how it works?

This PR addresses two inconsistencies in the buffer pool page layout calculations:

  1. Fix MAX_PAGE_NUM Calculation in BPFileHeader

From:

static const int MAX_PAGE_NUM = (BP_PAGE_DATA_SIZE - sizeof(page_count) - sizeof(allocated_pages)) * 8;

To:

static const int MAX_PAGE_NUM = (BP_PAGE_DATA_SIZE - sizeof(buffer_pool_id) - sizeof(page_count) - sizeof(allocated_pages)) * 8;
  1. Fix BP_PAGE_DATA_SIZE in page.h

From:

static constexpr const int BP_PAGE_DATA_SIZE = (BP_PAGE_SIZE - sizeof(PageNum) - sizeof(LSN) - sizeof(CheckSum));

To:

static constexpr const int BP_PAGE_DATA_SIZE = (BP_PAGE_SIZE - sizeof(LSN) - sizeof(CheckSum));

@CLAassistant
Copy link

CLAassistant commented May 19, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@nautaa nautaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your contribution, please resolve the failed ci.

@1036-ce
Copy link
Contributor Author

1036-ce commented May 19, 2025

The failed ci has been resolved

@nautaa nautaa merged commit ba987f1 into oceanbase:main May 19, 2025
15 checks passed
@nautaa
Copy link
Member

nautaa commented May 19, 2025

thanks again, If you want to continue contributing to the miniob/oceanbase community feel free to get in touch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Question about the calculation of BPFileHeader::MAX_PAGE_NUM and BP_PAGE_DATA_SIZE

3 participants