Skip to content

Commit bbfc419

Browse files
committed
Bug #32944543 USE FIL_SPACE_ACQUIRE_SILENT() INSTEAD OF FIL_SPACE_ACQUIRE() WHENEVER POSSIBLE
Problem: To avoid generating unwanted warning messages in the server log, the function fil_space_acquire_silent() needs to be used instead of fil_space_acquire() whenever possible. Identify the callers of fil_space_acquire() and check what they do when the function returns nullptr. If this doesn't result in an error situation, then most likely the function fil_space_acquire_silent() must be used. Solution: Use fil_space_acquire_silent() instead of fil_space_acquire() whenever applicable. rb#26320 in review by Marcin Babij <[email protected]>
1 parent 3857ef2 commit bbfc419

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

storage/innobase/btr/btr0btr.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,7 @@ void btr_truncate(const dict_index_t *index) {
10621062

10631063
page_no_t root_page_no = index->page;
10641064
space_id_t space_id = index->space;
1065-
fil_space_t *space = fil_space_acquire(space_id);
1065+
fil_space_t *space = fil_space_acquire_silent(space_id);
10661066

10671067
if (space == nullptr) {
10681068
return;
@@ -1118,7 +1118,7 @@ void btr_truncate_recover(const dict_index_t *index) {
11181118

11191119
page_no_t root_page_no = index->page;
11201120
space_id_t space_id = index->space;
1121-
fil_space_t *space = fil_space_acquire(space_id);
1121+
fil_space_t *space = fil_space_acquire_silent(space_id);
11221122

11231123
if (space == nullptr) {
11241124
return;

storage/innobase/buf/buf0rea.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ ulint buf_read_ahead_random(const page_id_t &page_id,
184184
/* Remember the tablespace version before we ask the tablespace size
185185
below: if DISCARD + IMPORT changes the actual .ibd file meanwhile, we
186186
do not try to read outside the bounds of the tablespace! */
187-
if (fil_space_t *space = fil_space_acquire(page_id.space())) {
187+
if (fil_space_t *space = fil_space_acquire_silent(page_id.space())) {
188188
if (high > space->size) {
189189
high = space->size;
190190
}
@@ -372,7 +372,7 @@ ulint buf_read_ahead_linear(const page_id_t &page_id,
372372
do not try to read outside the bounds of the tablespace! */
373373
ulint space_size;
374374

375-
if (fil_space_t *space = fil_space_acquire(page_id.space())) {
375+
if (fil_space_t *space = fil_space_acquire_silent(page_id.space())) {
376376
space_size = space->size;
377377

378378
fil_space_release(space);

storage/innobase/dict/dict0upgrade.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,7 @@ bool upgrade_space_version(const uint32 space_id, bool server_version_only) {
12901290
page_t *page;
12911291
mtr_t mtr;
12921292

1293-
fil_space_t *space = fil_space_acquire(space_id);
1293+
fil_space_t *space = fil_space_acquire_silent(space_id);
12941294

12951295
if (space == nullptr) {
12961296
return (true);

storage/innobase/ibuf/ibuf0ibuf.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4084,7 +4084,7 @@ void ibuf_merge_or_delete_for_page(buf_block_t *block, const page_id_t &page_id,
40844084
return;
40854085
}
40864086

4087-
space = fil_space_acquire(page_id.space());
4087+
space = fil_space_acquire_silent(page_id.space());
40884088

40894089
if (space == nullptr) {
40904090
/* Do not try to read the bitmap page from space;

storage/innobase/lock/lock0lock.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4708,7 +4708,7 @@ static bool lock_rec_fetch_page(const lock_t *lock) {
47084708

47094709
/* Check if the space is exists or not. only
47104710
when the space is valid, try to get the page. */
4711-
space = fil_space_acquire(space_id);
4711+
space = fil_space_acquire_silent(space_id);
47124712
if (space) {
47134713
mtr_start(&mtr);
47144714
buf_page_get_gen(page_id, page_size, RW_NO_LATCH, nullptr,
@@ -5115,7 +5115,7 @@ static void lock_rec_block_validate(const page_id_t &page_id) {
51155115

51165116
/* Make sure that the tablespace is not deleted while we are
51175117
trying to access the page. */
5118-
if (fil_space_t *space = fil_space_acquire(page_id.space())) {
5118+
if (fil_space_t *space = fil_space_acquire_silent(page_id.space())) {
51195119
mtr_start(&mtr);
51205120

51215121
block = buf_page_get_gen(page_id, page_size_t(space->flags), RW_X_LATCH,

0 commit comments

Comments
 (0)