Skip to content

Commit cec2d59

Browse files
authored
Merge pull request #7 from meeeejin/develop
Fix the read fail error
2 parents cd49e99 + 1f30316 commit cec2d59

File tree

3 files changed

+19
-13
lines changed

3 files changed

+19
-13
lines changed

storage/innobase/buf/buf0buf.cc

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4550,7 +4550,21 @@ buf_page_get_gen(
45504550
"innodb_page_corruption_retries",
45514551
retries = BUF_PAGE_READ_MAX_RETRIES;
45524552
);
4553+
4554+
#ifdef UNIV_NVDIMM_CACHE
4555+
buf_pool_t* after_buf_pool = buf_pool_get(page_id);
4556+
4557+
if (buf_pool->instance_no != after_buf_pool->instance_no) {
4558+
/*ib::info() << buf_pool->instance_no << " != "
4559+
<< after_buf_pool->instance_no << " for "
4560+
<< page_id.space() << " " << page_id.page_no();*/
4561+
buf_pool = after_buf_pool;
4562+
}
4563+
#endif /* UNIV_NVDIMM_CACHE */
45534564
} else {
4565+
/* mijin */
4566+
buf_pool_t* after_buf_pool = buf_pool_get(page_id);
4567+
45544568
ib::fatal() << "Unable to read page " << page_id
45554569
<< " into the buffer pool after "
45564570
<< BUF_PAGE_READ_MAX_RETRIES << " attempts."
@@ -4562,7 +4576,9 @@ buf_page_get_gen(
45624576
" you can try to fix this problem by using"
45634577
" innodb_force_recovery."
45644578
" Please see " REFMAN " for more"
4565-
" details. Aborting...";
4579+
" details. Aborting...before "
4580+
<< buf_pool->instance_no << " after "
4581+
<< after_buf_pool->instance_no;
45664582
}
45674583

45684584
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG

storage/innobase/buf/buf0flu.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,10 +1114,10 @@ buf_flush_write_block_low(
11141114

11151115
if (nvdimm_page == NULL) goto normal;
11161116

1117-
ib::info() << "page_id = " << bpage->id.space()
1117+
/*ib::info() << "page_id = " << bpage->id.space()
11181118
<< " offset = " << bpage->id.page_no()
11191119
<< " dst = " << &(((buf_block_t *)nvdimm_page)->frame) << " src = " << &(((buf_block_t *)bpage)->frame)
1120-
<< " flush-type = " << bpage->flush_type;
1120+
<< " flush-type = " << bpage->flush_type;*/
11211121
memcpy(((buf_block_t *)nvdimm_page)->frame, ((buf_block_t *)bpage)->frame, UNIV_PAGE_SIZE);
11221122

11231123
/* Set the oldest LSN of the NVDIMM page to the previous newest LSN. */

storage/innobase/buf/buf0lru.cc

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,16 +1175,6 @@ buf_LRU_get_free_only(
11751175
ut_d(block->page.in_free_list = FALSE);
11761176
ut_ad(!block->page.in_flush_list);
11771177
ut_ad(!block->page.in_LRU_list);
1178-
/* mijin */
1179-
if (buf_page_in_file(&block->page)) {
1180-
ib::info() << "not free: "
1181-
<< (&block->page)->id.space() << " "
1182-
<< (&block->page)->id.page_no() << " in "
1183-
<< buf_pool->instance_no
1184-
<< " state = " << (&block->page)->state
1185-
<< " io = " << (&block->page)->io_fix
1186-
<< " total = " << UT_LIST_GET_LEN(buf_pool->free);
1187-
}
11881178
ut_a(!buf_page_in_file(&block->page));
11891179
UT_LIST_REMOVE(buf_pool->free, &block->page);
11901180

0 commit comments

Comments
 (0)