diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-06-04 10:24:10 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-06-04 10:24:10 +0300 |
commit | eba2d10ac53d1d2f975027ba2b2ca39d9c9b98ad (patch) | |
tree | 7389791492884dd232c5ddc84e53e70a0a725770 /storage/innobase/row/row0ftsort.cc | |
parent | ad2bf1129cfa85c00072b46e0355fe14bf69ee54 (diff) | |
download | mariadb-git-eba2d10ac53d1d2f975027ba2b2ca39d9c9b98ad.tar.gz |
MDEV-22721 Remove bloat caused by InnoDB logger class
Introduce a new ATTRIBUTE_NOINLINE to
ib::logger member functions, and add UNIV_UNLIKELY hints to callers.
Also, remove some crash reporting output. If needed, the
information will be available using debugging tools.
Furthermore, remove some fts_enable_diag_print output that included
indexed words in raw form. The code seemed to assume that words are
NUL-terminated byte strings. It is not clear whether a NUL terminator
is always guaranteed to be present. Also, UCS2 or UTF-16 strings would
typically contain many NUL bytes.
Diffstat (limited to 'storage/innobase/row/row0ftsort.cc')
-rw-r--r-- | storage/innobase/row/row0ftsort.cc | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/storage/innobase/row/row0ftsort.cc b/storage/innobase/row/row0ftsort.cc index 2bd99a48628..c7c86fb337b 100644 --- a/storage/innobase/row/row0ftsort.cc +++ b/storage/innobase/row/row0ftsort.cc @@ -864,7 +864,8 @@ loop: num_doc_processed++; - if (fts_enable_diag_print && num_doc_processed % 10000 == 1) { + if (UNIV_UNLIKELY(fts_enable_diag_print) + && num_doc_processed % 10000 == 1) { ib::info() << "Number of documents processed: " << num_doc_processed; #ifdef FTS_INTERNAL_DIAG_PRINT @@ -1009,7 +1010,7 @@ exit: } } - if (fts_enable_diag_print) { + if (UNIV_UNLIKELY(fts_enable_diag_print)) { DEBUG_FTS_SORT_PRINT(" InnoDB_FTS: start merge sort\n"); } @@ -1040,7 +1041,7 @@ exit: } func_exit: - if (fts_enable_diag_print) { + if (UNIV_UNLIKELY(fts_enable_diag_print)) { DEBUG_FTS_SORT_PRINT(" InnoDB_FTS: complete merge sort\n"); } @@ -1215,11 +1216,9 @@ row_merge_write_fts_word( error = row_merge_write_fts_node(ins_ctx, &word->text, fts_node); - if (error != DB_SUCCESS) { - ib::error() << "Failed to write word " - << word->text.f_str << " to FTS auxiliary" - " index table, error (" << ut_strerr(error) - << ")"; + if (UNIV_UNLIKELY(error != DB_SUCCESS)) { + ib::error() << "Failed to write word to FTS auxiliary" + " index table, error " << error; ret = error; } @@ -1633,7 +1632,7 @@ row_fts_merge_insert( count_diag += (int) psort_info[i].merge_file[id]->n_rec; } - if (fts_enable_diag_print) { + if (UNIV_UNLIKELY(fts_enable_diag_print)) { ib::info() << "InnoDB_FTS: to insert " << count_diag << " records"; } @@ -1801,7 +1800,7 @@ exit: mem_heap_free(heap); - if (fts_enable_diag_print) { + if (UNIV_UNLIKELY(fts_enable_diag_print)) { ib::info() << "InnoDB_FTS: inserted " << count << " records"; } |