summaryrefslogtreecommitdiff
path: root/storage/innobase/include/log0recv.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-03-08 11:40:43 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2017-03-08 11:40:43 +0200
commit47396ddea91698f6ea1829697566a4d7c31bc789 (patch)
tree552acc26b963574a234d2a3bc22b2190e5eabf0e /storage/innobase/include/log0recv.h
parentc4f3e64c23fe7f7fd18c0a79f87f9771df15fe9f (diff)
parent6860a4b55664d8fc53636906240c089417e1849d (diff)
downloadmariadb-git-47396ddea91698f6ea1829697566a4d7c31bc789.tar.gz
Merge 5.5 into 10.0
Also, implement MDEV-11027 a little differently from 5.5: recv_sys_t::report(ib_time_t): Determine whether progress should be reported. recv_apply_hashed_log_recs(): Rename the parameter to last_batch.
Diffstat (limited to 'storage/innobase/include/log0recv.h')
-rw-r--r--storage/innobase/include/log0recv.h33
1 files changed, 21 insertions, 12 deletions
diff --git a/storage/innobase/include/log0recv.h b/storage/innobase/include/log0recv.h
index f4c7b4ed882..bf34b6a3e29 100644
--- a/storage/innobase/include/log0recv.h
+++ b/storage/innobase/include/log0recv.h
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2017, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -271,20 +272,12 @@ void
recv_sys_var_init(void);
/*===================*/
#endif /* !UNIV_HOTBACKUP */
-/*******************************************************************//**
-Empties the hash table of stored log records, applying them to appropriate
-pages. */
+/** Apply the hash table of stored log records to persistent data pages.
+@param[in] last_batch whether the change buffer merge will be
+ performed as part of the operation */
UNIV_INTERN
void
-recv_apply_hashed_log_recs(
-/*=======================*/
- ibool allow_ibuf); /*!< in: if TRUE, also ibuf operations are
- allowed during the application; if FALSE,
- no ibuf operations are allowed, and after
- the application all file pages are flushed to
- disk and invalidated in buffer pool: this
- alternative means that no new log records
- can be generated during the application */
+recv_apply_hashed_log_recs(bool last_batch);
#ifdef UNIV_HOTBACKUP
/*******************************************************************//**
Applies log records in the hash table to a backup. */
@@ -434,6 +427,8 @@ struct recv_sys_t{
scan find a corrupt log block, or a corrupt
log record, or there is a log parsing
buffer overflow */
+ /** the time when progress was last reported */
+ ib_time_t progress_time;
#ifdef UNIV_LOG_ARCHIVE
log_group_t* archive_group;
/*!< in archive recovery: the log group whose
@@ -446,6 +441,20 @@ struct recv_sys_t{
addresses in the hash table */
recv_dblwr_t dblwr;
+
+ /** Determine whether redo log recovery progress should be reported.
+ @param[in] time the current time
+ @return whether progress should be reported
+ (the last report was at least 15 seconds ago) */
+ bool report(ib_time_t time)
+ {
+ if (time - progress_time < 15) {
+ return false;
+ }
+
+ progress_time = time;
+ return true;
+ }
};
/** The recovery system */