mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
Code cleanup: Removed some unnecessary outputs from standard builds (available on
special builds UNIV_PAGECOMPRESS_DEBUG and UNIV_MTFLUSH_DEBUG). Added a new status variable compress_pages_page_compression_error to count possible compression errors.
This commit is contained in:
@@ -2461,7 +2461,7 @@ DECLARE_THREAD(buf_flush_page_cleaner_thread)(
|
||||
|
||||
/* Flush pages from end of LRU if required */
|
||||
n_lru = n_flushed = buf_flush_LRU_tail();
|
||||
#ifdef UNIV_DEBUG
|
||||
#ifdef UNIV_MTFLUSH_DEBUG
|
||||
if (n_lru) {
|
||||
fprintf(stderr,"n_lru:%lu ",n_lru);
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ buf_mtflu_flush_pool_instance(
|
||||
pools based on the assumption that it will
|
||||
help in the retry which will follow the
|
||||
failure. */
|
||||
#ifdef UNIV_DEBUG
|
||||
#ifdef UNIV_MTFLUSH_DEBUG
|
||||
fprintf(stderr, "InnoDB: Note: buf flush start failed there is already active flush for this buffer pool.\n");
|
||||
#endif
|
||||
return 0;
|
||||
@@ -330,12 +330,12 @@ DECLARE_THREAD(mtflush_io_thread)(
|
||||
|
||||
while (TRUE) {
|
||||
|
||||
#ifdef UNIV_DEBUG
|
||||
#ifdef UNIV_MTFLUSH_DEBUG
|
||||
fprintf(stderr, "InnoDB: Note. Thread %lu work queue len %lu return queue len %lu\n",
|
||||
os_thread_get_curr_id(),
|
||||
ib_wqueue_len(mtflush_io->wq),
|
||||
ib_wqueue_len(mtflush_io->wr_cq));
|
||||
#endif /* UNIV_DEBUG */
|
||||
#endif /* UNIV_MTFLUSH_DEBUG */
|
||||
|
||||
mtflush_service_io(mtflush_io, this_thread_data);
|
||||
|
||||
@@ -374,7 +374,7 @@ buf_mtflu_io_thread_exit(void)
|
||||
|
||||
mtflush_io->gwt_status = WTHR_KILL_IT;
|
||||
|
||||
fprintf(stderr, "signal mtflush_io_threads to exit [%lu]\n",
|
||||
fprintf(stderr, "InnoDB: [Note]: Signal mtflush_io_threads to exit [%lu]\n",
|
||||
srv_mtflush_threads);
|
||||
|
||||
/* Send one exit work item/thread */
|
||||
@@ -544,6 +544,7 @@ buf_mtflu_flush_work_items(
|
||||
if (done_wi != NULL) {
|
||||
per_pool_pages_flushed[i] = done_wi->n_flushed;
|
||||
|
||||
#if UNIV_DEBUG
|
||||
if((int)done_wi->id_usr == 0 &&
|
||||
(done_wi->wi_status == WRK_ITEM_SET ||
|
||||
done_wi->wi_status == WRK_ITEM_UNSET)) {
|
||||
@@ -553,6 +554,7 @@ buf_mtflu_flush_work_items(
|
||||
done_wi->wr.flush_type);
|
||||
ut_a(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
n_flushed+= done_wi->n_flushed;
|
||||
i++;
|
||||
@@ -621,7 +623,7 @@ buf_mtflu_flush_list(
|
||||
cnt_flush[i]);
|
||||
}
|
||||
}
|
||||
#ifdef UNIV_DEBUG
|
||||
#ifdef UNIV_MTFLUSH_DEBUG
|
||||
fprintf(stderr, "%s: [1] [*n_processed: (min:%lu)%lu ]\n",
|
||||
__FUNCTION__, (min_n * srv_buf_pool_instances), *n_processed);
|
||||
#endif
|
||||
@@ -663,7 +665,7 @@ buf_mtflu_flush_LRU_tail(void)
|
||||
}
|
||||
}
|
||||
|
||||
#if UNIV_DEBUG
|
||||
#if UNIV_MTFLUSH_DEBUG
|
||||
fprintf(stderr, "[1] [*n_processed: (min:%lu)%lu ]\n", (
|
||||
srv_LRU_scan_depth * srv_buf_pool_instances), total_flushed);
|
||||
#endif
|
||||
|
||||
@@ -106,11 +106,11 @@ fil_compress_page(
|
||||
level = page_zip_level;
|
||||
}
|
||||
|
||||
#ifdef UNIV_DEBUG
|
||||
#ifdef UNIV_PAGECOMPRESS_DEBUG
|
||||
fprintf(stderr,
|
||||
"InnoDB: Note: Preparing for compress for space %lu name %s len %lu\n",
|
||||
space_id, fil_space_name(space), len);
|
||||
#endif /* UNIV_DEBUG */
|
||||
#endif /* UNIV_PAGECOMPRESS_DEBUG */
|
||||
|
||||
write_size = UNIV_PAGE_SIZE - header_len;
|
||||
|
||||
@@ -126,6 +126,7 @@ fil_compress_page(
|
||||
"InnoDB: Warning: Compression failed for space %lu name %s len %lu rt %d write %lu\n",
|
||||
space_id, fil_space_name(space), len, err, write_size);
|
||||
|
||||
srv_stats.pages_page_compression_error.inc();
|
||||
*out_len = len;
|
||||
return (buf);
|
||||
}
|
||||
@@ -140,6 +141,7 @@ fil_compress_page(
|
||||
"InnoDB: Warning: Compression failed for space %lu name %s len %lu rt %d write %lu\n",
|
||||
space_id, fil_space_name(space), len, err, write_size);
|
||||
|
||||
srv_stats.pages_page_compression_error.inc();
|
||||
*out_len = len;
|
||||
return (buf);
|
||||
}
|
||||
@@ -197,11 +199,11 @@ fil_compress_page(
|
||||
ut_a((write_size % SECT_SIZE) == 0);
|
||||
}
|
||||
|
||||
#ifdef UNIV_DEBUG
|
||||
#ifdef UNIV_PAGECOMPRESS_DEBUG
|
||||
fprintf(stderr,
|
||||
"InnoDB: Note: Compression succeeded for space %lu name %s len %lu out_len %lu\n",
|
||||
space_id, fil_space_name(space), len, write_size);
|
||||
#endif
|
||||
#endif /* UNIV_PAGECOMPRESS_DEBUG */
|
||||
|
||||
|
||||
srv_stats.page_compression_saved.add((len - write_size));
|
||||
@@ -209,7 +211,7 @@ fil_compress_page(
|
||||
srv_stats.page_compression_trim_sect512.add(((len - write_size) / SECT_SIZE));
|
||||
srv_stats.page_compression_trim_sect4096.add(((len - write_size) / (SECT_SIZE*8)));
|
||||
}
|
||||
//srv_stats.page_compressed_trim_op.inc();
|
||||
|
||||
srv_stats.pages_page_compressed.inc();
|
||||
*out_len = write_size;
|
||||
|
||||
@@ -258,10 +260,10 @@ fil_decompress_page(
|
||||
|
||||
// If no buffer was given, we need to allocate temporal buffer
|
||||
if (page_buf == NULL) {
|
||||
#ifdef UNIV_DEBUG
|
||||
#ifdef UNIV_PAGECOMPRESS_DEBUG
|
||||
fprintf(stderr,
|
||||
"InnoDB: Note: FIL: Compression buffer not given, allocating...\n");
|
||||
#endif /* UNIV_DEBUG */
|
||||
#endif /* UNIV_PAGECOMPRESS_DEBUG */
|
||||
in_buf = static_cast<byte *>(ut_malloc(UNIV_PAGE_SIZE));
|
||||
} else {
|
||||
in_buf = page_buf;
|
||||
@@ -287,11 +289,11 @@ fil_decompress_page(
|
||||
|
||||
if (compression_alg == FIL_PAGE_COMPRESSION_ZLIB) {
|
||||
|
||||
#ifdef UNIV_DEBUG
|
||||
#ifdef UNIV_PAGECOMPRESS_DEBUG
|
||||
fprintf(stderr,
|
||||
"InnoDB: Note: Preparing for decompress for len %lu\n",
|
||||
actual_size);
|
||||
#endif /* UNIV_DEBUG */
|
||||
#endif /* UNIV_PAGECOMPRESS_DEBUG */
|
||||
|
||||
err= uncompress(in_buf, &len, buf+FIL_PAGE_DATA+FIL_PAGE_COMPRESSED_SIZE, (unsigned long)actual_size);
|
||||
|
||||
@@ -310,11 +312,11 @@ fil_decompress_page(
|
||||
ut_error;
|
||||
}
|
||||
|
||||
#ifdef UNIV_DEBUG
|
||||
#ifdef UNIV_PAGECOMPRESS_DEBUG
|
||||
fprintf(stderr,
|
||||
"InnoDB: Note: Decompression succeeded for len %lu \n",
|
||||
len);
|
||||
#endif /* UNIV_DEBUG */
|
||||
#endif /* UNIV_PAGECOMPRESS_DEBUG */
|
||||
#ifdef HAVE_LZ4
|
||||
} else if (compression_alg == FIL_PAGE_COMPRESSION_LZ4) {
|
||||
err = LZ4_decompress_fast((const char *)buf+FIL_PAGE_DATA+FIL_PAGE_COMPRESSED_SIZE, (char *)in_buf, UNIV_PAGE_SIZE);
|
||||
|
||||
@@ -315,6 +315,7 @@ enum monitor_id_t {
|
||||
MONITOR_OVLD_PAGE_COMPRESSED_TRIM_OP,
|
||||
MONITOR_OVLD_PAGE_COMPRESSED_TRIM_OP_SAVED,
|
||||
MONITOR_OVLD_PAGES_PAGE_DECOMPRESSED,
|
||||
MONITOR_OVLD_PAGES_PAGE_COMPRESSION_ERROR,
|
||||
|
||||
/* Index related counters */
|
||||
MONITOR_MODULE_INDEX,
|
||||
|
||||
@@ -121,6 +121,8 @@ struct srv_stats_t {
|
||||
ulint_ctr_64_t page_compressed_trim_op_saved;
|
||||
/* Number of pages decompressed with page compression */
|
||||
ulint_ctr_64_t pages_page_decompressed;
|
||||
/* Number of page compression errors */
|
||||
ulint_ctr_64_t pages_page_compression_error;
|
||||
|
||||
/** Number of data read in total (in bytes) */
|
||||
ulint_ctr_1_t data_read;
|
||||
@@ -908,6 +910,8 @@ struct export_var_t{
|
||||
ib_int64_t innodb_pages_page_decompressed;/*!< Number of pages
|
||||
decompressed by page
|
||||
compression */
|
||||
ib_int64_t innodb_pages_page_compression_error;/*!< Number of page
|
||||
compression errors */
|
||||
};
|
||||
|
||||
/** Thread slot in the thread table. */
|
||||
|
||||
@@ -6166,7 +6166,7 @@ os_file_trim(
|
||||
*slot->write_size > 0 &&
|
||||
len >= *slot->write_size)) {
|
||||
|
||||
#ifdef UNIV_DEBUG
|
||||
#ifdef UNIV_PAGECOMPRESS_DEBUG
|
||||
fprintf(stderr, "Note: TRIM: write_size %lu trim_len %lu len %lu\n",
|
||||
*slot->write_size, trim_len, len);
|
||||
#endif
|
||||
|
||||
@@ -926,6 +926,11 @@ static monitor_info_t innodb_counter_info[] =
|
||||
MONITOR_NONE,
|
||||
MONITOR_DEFAULT_START, MONITOR_OVLD_PAGES_PAGE_DECOMPRESSED},
|
||||
|
||||
{"compress_pages_page_compression_error", "compression",
|
||||
"Number of page compression errors",
|
||||
MONITOR_NONE,
|
||||
MONITOR_DEFAULT_START, MONITOR_OVLD_PAGES_PAGE_COMPRESSION_ERROR},
|
||||
|
||||
/* ========== Counters for Index ========== */
|
||||
{"module_index", "index", "Index Manager",
|
||||
MONITOR_MODULE,
|
||||
@@ -1871,6 +1876,9 @@ srv_mon_process_existing_counter(
|
||||
case MONITOR_OVLD_PAGES_PAGE_DECOMPRESSED:
|
||||
value = srv_stats.pages_page_decompressed;
|
||||
break;
|
||||
case MONITOR_OVLD_PAGES_PAGE_COMPRESSION_ERROR:
|
||||
value = srv_stats.pages_page_compression_error;
|
||||
break;
|
||||
|
||||
default:
|
||||
ut_error;
|
||||
|
||||
@@ -721,7 +721,7 @@ buf_flush_write_complete(
|
||||
|
||||
buf_pool->n_flush[flush_type]--;
|
||||
|
||||
#ifdef UNIV_DEBUG
|
||||
#ifdef UNIV_MTFLUSH_DEBUG
|
||||
fprintf(stderr, "n pending flush %lu\n",
|
||||
buf_pool->n_flush[flush_type]);
|
||||
#endif
|
||||
@@ -1863,7 +1863,7 @@ buf_flush_start(
|
||||
|
||||
/* There is already a flush batch of the same type running */
|
||||
|
||||
#ifdef UNIV_DEBUG
|
||||
#ifdef UNIV_PAGECOMPRESS_DEBUG
|
||||
fprintf(stderr, "Error: flush_type %d n_flush %lu init_flush %lu\n",
|
||||
flush_type, buf_pool->n_flush[flush_type], buf_pool->init_flush[flush_type]);
|
||||
#endif
|
||||
@@ -2732,7 +2732,7 @@ DECLARE_THREAD(buf_flush_page_cleaner_thread)(
|
||||
|
||||
/* Flush pages from end of LRU if required */
|
||||
n_lru = n_flushed = buf_flush_LRU_tail();
|
||||
#ifdef UNIV_DEBUG
|
||||
#ifdef UNIV_MTFLUSH_DEBUG
|
||||
if (n_lru) {
|
||||
fprintf(stderr,"n_lru:%lu ",n_lru);
|
||||
}
|
||||
@@ -2743,7 +2743,7 @@ DECLARE_THREAD(buf_flush_page_cleaner_thread)(
|
||||
|
||||
/* Flush pages from flush_list if required */
|
||||
n_flushed += n_pgc_flush = page_cleaner_flush_pages_if_needed();
|
||||
#ifdef UNIV_DEBUG
|
||||
#ifdef UNIV_MTFLUSH_DEBUG
|
||||
if (n_pgc_flush) {
|
||||
fprintf(stderr,"n_pgc_flush:%lu ",n_pgc_flush);
|
||||
}
|
||||
@@ -2760,16 +2760,16 @@ DECLARE_THREAD(buf_flush_page_cleaner_thread)(
|
||||
MONITOR_FLUSH_BACKGROUND_PAGES,
|
||||
n_flushed);
|
||||
}
|
||||
#ifdef UNIV_DEBUG
|
||||
#ifdef UNIV_MTFLUSH_DEBUG
|
||||
if (n_pgc_batch) {
|
||||
fprintf(stderr,"n_pgc_batch:%lu ",n_pgc_batch);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef UNIV_DEBUG
|
||||
#ifdef UNIV_MTFLUSH_DEBUG
|
||||
if (n_lru || n_pgc_flush || n_pgc_batch) {
|
||||
fprintf(stderr,"\n");
|
||||
fprintf1(stderr,"\n");
|
||||
n_lru = n_pgc_flush = n_pgc_batch = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -199,7 +199,7 @@ buf_mtflu_flush_pool_instance(
|
||||
pools based on the assumption that it will
|
||||
help in the retry which will follow the
|
||||
failure. */
|
||||
#ifdef UNIV_DEBUG
|
||||
#ifdef UNIV_MTFLUSH_DEBUG
|
||||
fprintf(stderr, "InnoDB: Note: buf flush start failed there is already active flush for this buffer pool.\n");
|
||||
#endif
|
||||
return 0;
|
||||
@@ -337,12 +337,12 @@ DECLARE_THREAD(mtflush_io_thread)(
|
||||
|
||||
while (TRUE) {
|
||||
|
||||
#ifdef UNIV_DEBUG
|
||||
#ifdef UNIV_MTFLUSH_DEBUG
|
||||
fprintf(stderr, "InnoDB: Note. Thread %lu work queue len %lu return queue len %lu\n",
|
||||
os_thread_get_curr_id(),
|
||||
ib_wqueue_len(mtflush_io->wq),
|
||||
ib_wqueue_len(mtflush_io->wr_cq));
|
||||
#endif /* UNIV_DEBUG */
|
||||
#endif /* UNIV_MTFLUSH_DEBUG */
|
||||
|
||||
mtflush_service_io(mtflush_io, this_thread_data);
|
||||
|
||||
@@ -381,7 +381,7 @@ buf_mtflu_io_thread_exit(void)
|
||||
|
||||
mtflush_io->gwt_status = WTHR_KILL_IT;
|
||||
|
||||
fprintf(stderr, "signal mtflush_io_threads to exit [%lu]\n",
|
||||
fprintf(stderr, "InnoDB: [Note]: Signal mtflush_io_threads to exit [%lu]\n",
|
||||
srv_mtflush_threads);
|
||||
|
||||
/* Send one exit work item/thread */
|
||||
@@ -551,6 +551,7 @@ buf_mtflu_flush_work_items(
|
||||
if (done_wi != NULL) {
|
||||
per_pool_pages_flushed[i] = done_wi->n_flushed;
|
||||
|
||||
#if UNIV_DEBUG
|
||||
if((int)done_wi->id_usr == 0 &&
|
||||
(done_wi->wi_status == WRK_ITEM_SET ||
|
||||
done_wi->wi_status == WRK_ITEM_UNSET)) {
|
||||
@@ -560,6 +561,7 @@ buf_mtflu_flush_work_items(
|
||||
done_wi->wr.flush_type);
|
||||
ut_a(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
n_flushed+= done_wi->n_flushed;
|
||||
i++;
|
||||
@@ -631,7 +633,7 @@ buf_mtflu_flush_list(
|
||||
cnt_flush[i]);
|
||||
}
|
||||
}
|
||||
#ifdef UNIV_DEBUG
|
||||
#ifdef UNIV_MTFLUSH_DEBUG
|
||||
fprintf(stderr, "%s: [1] [*n_processed: (min:%lu)%lu ]\n",
|
||||
__FUNCTION__, (min_n * srv_buf_pool_instances), *n_processed);
|
||||
#endif
|
||||
@@ -673,7 +675,7 @@ buf_mtflu_flush_LRU_tail(void)
|
||||
}
|
||||
}
|
||||
|
||||
#if UNIV_DEBUG
|
||||
#if UNIV_MTFLUSH_DEBUG
|
||||
fprintf(stderr, "[1] [*n_processed: (min:%lu)%lu ]\n", (
|
||||
srv_LRU_scan_depth * srv_buf_pool_instances), total_flushed);
|
||||
#endif
|
||||
|
||||
@@ -106,11 +106,11 @@ fil_compress_page(
|
||||
level = page_zip_level;
|
||||
}
|
||||
|
||||
#ifdef UNIV_DEBUG
|
||||
#ifdef UNIV_PAGECOMPRESS_DEBUG
|
||||
fprintf(stderr,
|
||||
"InnoDB: Note: Preparing for compress for space %lu name %s len %lu\n",
|
||||
space_id, fil_space_name(space), len);
|
||||
#endif /* UNIV_DEBUG */
|
||||
#endif /* UNIV_PAGECOMPRESS_DEBUG */
|
||||
|
||||
write_size = UNIV_PAGE_SIZE - header_len;
|
||||
|
||||
@@ -126,6 +126,7 @@ fil_compress_page(
|
||||
"InnoDB: Warning: Compression failed for space %lu name %s len %lu rt %d write %lu\n",
|
||||
space_id, fil_space_name(space), len, err, write_size);
|
||||
|
||||
srv_stats.pages_page_compression_error.inc();
|
||||
*out_len = len;
|
||||
return (buf);
|
||||
}
|
||||
@@ -140,6 +141,7 @@ fil_compress_page(
|
||||
"InnoDB: Warning: Compression failed for space %lu name %s len %lu rt %d write %lu\n",
|
||||
space_id, fil_space_name(space), len, err, write_size);
|
||||
|
||||
srv_stats.pages_page_compression_error.inc();
|
||||
*out_len = len;
|
||||
return (buf);
|
||||
}
|
||||
@@ -193,11 +195,11 @@ fil_compress_page(
|
||||
ut_a((write_size % SECT_SIZE) == 0);
|
||||
}
|
||||
|
||||
#ifdef UNIV_DEBUG
|
||||
#ifdef UNIV_PAGECOMPRESS_DEBUG
|
||||
fprintf(stderr,
|
||||
"InnoDB: Note: Compression succeeded for space %lu name %s len %lu out_len %lu\n",
|
||||
space_id, fil_space_name(space), len, write_size);
|
||||
#endif /* UNIV_DEBUG */
|
||||
#endif /* UNIV_PAGECOMPRESS_DEBUG */
|
||||
|
||||
|
||||
srv_stats.page_compression_saved.add((len - write_size));
|
||||
@@ -205,7 +207,7 @@ fil_compress_page(
|
||||
srv_stats.page_compression_trim_sect512.add(((len - write_size) / SECT_SIZE));
|
||||
srv_stats.page_compression_trim_sect4096.add(((len - write_size) / (SECT_SIZE*8)));
|
||||
}
|
||||
//srv_stats.page_compressed_trim_op.inc();
|
||||
|
||||
srv_stats.pages_page_compressed.inc();
|
||||
*out_len = write_size;
|
||||
|
||||
@@ -254,10 +256,10 @@ fil_decompress_page(
|
||||
|
||||
// If no buffer was given, we need to allocate temporal buffer
|
||||
if (page_buf == NULL) {
|
||||
#ifdef UNIV_DEBUG
|
||||
#ifdef UNIV_PAGECOMPRESS_DEBUG
|
||||
fprintf(stderr,
|
||||
"InnoDB: FIL: Note: Compression buffer not given, allocating...\n");
|
||||
#endif /* UNIV_DEBUG */
|
||||
#endif /* UNIV_PAGECOMPRESS_DEBUG */
|
||||
in_buf = static_cast<byte *>(ut_malloc(UNIV_PAGE_SIZE));
|
||||
} else {
|
||||
in_buf = page_buf;
|
||||
@@ -283,11 +285,11 @@ fil_decompress_page(
|
||||
|
||||
if (compression_alg == FIL_PAGE_COMPRESSION_ZLIB) {
|
||||
|
||||
#ifdef UNIV_DEBUG
|
||||
#ifdef UNIV_PAGECOMPRESS_DEBUG
|
||||
fprintf(stderr,
|
||||
"InnoDB: Note: Preparing for decompress for len %lu\n",
|
||||
actual_size);
|
||||
#endif /* UNIV_DEBUG */
|
||||
#endif /* UNIV_PAGECOMPRESS_DEBUG */
|
||||
|
||||
err= uncompress(in_buf, &len, buf+FIL_PAGE_DATA+FIL_PAGE_COMPRESSED_SIZE, (unsigned long)actual_size);
|
||||
|
||||
@@ -305,11 +307,11 @@ fil_decompress_page(
|
||||
ut_error;
|
||||
}
|
||||
|
||||
#ifdef UNIV_DEBUG
|
||||
#ifdef UNIV_PAGECOMPRESS_DEBUG
|
||||
fprintf(stderr,
|
||||
"InnoDB: Note: Decompression succeeded for len %lu \n",
|
||||
len);
|
||||
#endif /* UNIV_DEBUG */
|
||||
#endif /* UNIV_PAGECOMPRESS_DEBUG */
|
||||
#ifdef HAVE_LZ4
|
||||
} else if (compression_alg == FIL_PAGE_COMPRESSION_LZ4) {
|
||||
err = LZ4_decompress_fast((const char *)buf+FIL_PAGE_DATA+FIL_PAGE_COMPRESSED_SIZE, (char *)in_buf, UNIV_PAGE_SIZE);
|
||||
|
||||
@@ -316,6 +316,7 @@ enum monitor_id_t {
|
||||
MONITOR_OVLD_PAGE_COMPRESSED_TRIM_OP,
|
||||
MONITOR_OVLD_PAGE_COMPRESSED_TRIM_OP_SAVED,
|
||||
MONITOR_OVLD_PAGES_PAGE_DECOMPRESSED,
|
||||
MONITOR_OVLD_PAGES_PAGE_COMPRESSION_ERROR,
|
||||
|
||||
/* Index related counters */
|
||||
MONITOR_MODULE_INDEX,
|
||||
|
||||
@@ -121,6 +121,8 @@ struct srv_stats_t {
|
||||
ulint_ctr_64_t page_compressed_trim_op_saved;
|
||||
/* Number of pages decompressed with page compression */
|
||||
ulint_ctr_64_t pages_page_decompressed;
|
||||
/* Number of page compression errors */
|
||||
ulint_ctr_64_t pages_page_compression_error;
|
||||
|
||||
/** Number of data read in total (in bytes) */
|
||||
ulint_ctr_1_t data_read;
|
||||
@@ -1117,6 +1119,8 @@ struct export_var_t{
|
||||
ib_int64_t innodb_pages_page_decompressed;/*!< Number of pages
|
||||
decompressed by page
|
||||
compression */
|
||||
ib_int64_t innodb_pages_page_compression_error;/*!< Number of page
|
||||
compression errors */
|
||||
};
|
||||
|
||||
/** Thread slot in the thread table. */
|
||||
|
||||
@@ -6234,7 +6234,7 @@ os_file_trim(
|
||||
*slot->write_size > 0 &&
|
||||
len >= *slot->write_size)) {
|
||||
|
||||
#ifdef UNIV_DEBUG
|
||||
#ifdef UNIV_PAGECOMPRESS_DEBUG
|
||||
fprintf(stderr, "Note: TRIM: write_size %lu trim_len %lu len %lu\n",
|
||||
*slot->write_size, trim_len, len);
|
||||
#endif
|
||||
|
||||
@@ -926,6 +926,11 @@ static monitor_info_t innodb_counter_info[] =
|
||||
MONITOR_NONE,
|
||||
MONITOR_DEFAULT_START, MONITOR_OVLD_PAGES_PAGE_DECOMPRESSED},
|
||||
|
||||
{"compress_pages_page_compression_error", "compression",
|
||||
"Number of page compression errors",
|
||||
MONITOR_NONE,
|
||||
MONITOR_DEFAULT_START, MONITOR_OVLD_PAGES_PAGE_COMPRESSION_ERROR},
|
||||
|
||||
/* ========== Counters for Index ========== */
|
||||
{"module_index", "index", "Index Manager",
|
||||
MONITOR_MODULE,
|
||||
@@ -1871,6 +1876,9 @@ srv_mon_process_existing_counter(
|
||||
case MONITOR_OVLD_PAGES_PAGE_DECOMPRESSED:
|
||||
value = srv_stats.pages_page_decompressed;
|
||||
break;
|
||||
case MONITOR_OVLD_PAGES_PAGE_COMPRESSION_ERROR:
|
||||
value = srv_stats.pages_page_compression_error;
|
||||
break;
|
||||
|
||||
default:
|
||||
ut_error;
|
||||
|
||||
Reference in New Issue
Block a user