summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorunknown <heikki@donna.mysql.fi>2001-12-24 22:27:11 +0200
committerunknown <heikki@donna.mysql.fi>2001-12-24 22:27:11 +0200
commit42c224c388452598ca1539325b53bf4ebaccb682 (patch)
tree04c4faf9687dda2e971f57599842c953f24a061f /innobase
parentc428e8073efa69b6cd9f6c3d11c2d1d791ac5836 (diff)
downloadmariadb-git-42c224c388452598ca1539325b53bf4ebaccb682.tar.gz
log0recv.c:
Print progress info of the applying log records to the database phase in recovery srv0srv.c: Do buffer pool flush and checkpoints more often to make recovery faster innobase/srv/srv0srv.c: Do buffer pool flush and checkpoints more often to make recovery faster innobase/log/log0recv.c: Print progress info of the applying log records to the database phase in recovery
Diffstat (limited to 'innobase')
-rw-r--r--innobase/log/log0recv.c18
-rw-r--r--innobase/srv/srv0srv.c14
2 files changed, 30 insertions, 2 deletions
diff --git a/innobase/log/log0recv.c b/innobase/log/log0recv.c
index f83a49d01a6..5cd5850d1a1 100644
--- a/innobase/log/log0recv.c
+++ b/innobase/log/log0recv.c
@@ -1019,7 +1019,8 @@ loop:
if (recv_addr->state == RECV_NOT_PROCESSED) {
if (!has_printed) {
fprintf(stderr,
-"InnoDB: Starting an apply batch of log records to the database...\n");
+"InnoDB: Starting an apply batch of log records to the database...\n"
+"InnoDB: Progress in percents:");
has_printed = TRUE;
}
@@ -1046,6 +1047,16 @@ loop:
recv_addr = HASH_GET_NEXT(addr_hash, recv_addr);
}
+
+ if (has_printed
+ && (i * 100) / hash_get_n_cells(recv_sys->addr_hash)
+ != ((i + 1) * 100)
+ / hash_get_n_cells(recv_sys->addr_hash)) {
+
+ fprintf(stderr, "%lu ",
+ (i * 100) / hash_get_n_cells(recv_sys->addr_hash));
+
+ }
}
/* Wait until all the pages have been processed */
@@ -1059,6 +1070,11 @@ loop:
mutex_enter(&(recv_sys->mutex));
}
+ if (has_printed) {
+
+ fprintf(stderr, "\n");
+ }
+
if (!allow_ibuf) {
/* Flush all the file pages to disk and invalidate them in
the buffer pool */
diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c
index 37bf59b6b9a..d77db335366 100644
--- a/innobase/srv/srv0srv.c
+++ b/innobase/srv/srv0srv.c
@@ -2417,7 +2417,19 @@ loop:
background_loop:
/* In this loop we run background operations when the server
- is quiet */
+ is quiet and we also come here about once in 10 seconds */
+
+ srv_main_thread_op_info = "flushing buffer pool pages";
+
+ /* Flush a few oldest pages to make the checkpoint younger */
+
+ n_pages_flushed = buf_flush_batch(BUF_FLUSH_LIST, 10, ut_dulint_max);
+
+ srv_main_thread_op_info = "making checkpoint";
+
+ /* Make a new checkpoint about once in 10 seconds */
+
+ log_checkpoint(TRUE, FALSE);
srv_main_thread_op_info = "reserving kernel mutex";