Skip to content

Commit

Permalink
Merge branch 'oceanbase:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
stevelee477 authored Oct 20, 2023
2 parents 869b145 + 19febc8 commit de3e972
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/observer/storage/record/record_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,12 @@ RecordPageHandler::~RecordPageHandler() { cleanup(); }
RC RecordPageHandler::init(DiskBufferPool &buffer_pool, PageNum page_num, bool readonly)
{
if (disk_buffer_pool_ != nullptr) {
LOG_WARN("Disk buffer pool has been opened for page_num %d.", page_num);
return RC::RECORD_OPENNED;
if (frame_->page_num() == page_num) {
LOG_WARN("Disk buffer pool has been opened for page_num %d.", page_num);
return RC::RECORD_OPENNED;
} else {
cleanup();
}
}

RC ret = RC::SUCCESS;
Expand Down Expand Up @@ -457,7 +461,7 @@ RC RecordFileHandler::get_record(RecordPageHandler &page_handler, const RID *rid
}

RC ret = page_handler.init(*disk_buffer_pool_, rid->page_num, readonly);
if (OB_FAIL(ret)) {
if (OB_FAIL(ret) && ret != RC::RECORD_OPENNED) {
LOG_ERROR("Failed to init record page handler.page number=%d", rid->page_num);
return ret;
}
Expand Down

0 comments on commit de3e972

Please sign in to comment.