codership / mysql-wsrep

wsrep API patch for MySQL server
Other
64 stars 34 forks source link

Regression: Duplicate "file was not purged because it is the active log file" warning #71

Open philip-galera opened 9 years ago

philip-galera commented 9 years ago

Some non-Galera MTR tests now fail because a warning is printed twice. To reproduce:

 perl mysql-test-run.pl --suite binlog binlog_index

which results in:

--- /home/philips/git/mysql-wsrep/mysql-test/suite/binlog/r/binlog_index.result 2014-10-16 12:39:58.414471932 +0300
+++ /home/philips/git/mysql-wsrep/mysql-test/var/log/binlog_index.reject        2015-02-19 13:10:58.319973417 +0300
@@ -31,6 +31,7 @@
 *** must be a warning master-bin.000001 was not found ***
 Warnings:
 Warning        1868    file master-bin.000004 was not purged because it is the active log file.
+Warning        1868    file master-bin.000004 was not purged because it is the active log file.
 Warning        1612    Being purged log master-bin.000001 was not found

Can that be a merge problem of some sort?

philip-galera commented 9 years ago

One of the paths that is printing this message seems to have been touched recently:

2bcbc062 (sjaakola                   2015-02-18 08:56:09 +0200 4817)   if (log_is_active)
2bcbc062 (sjaakola                   2015-02-18 08:56:09 +0200 4818)   {
2bcbc062 (sjaakola                   2015-02-18 08:56:09 +0200 4819)     if(!auto_purge)
2bcbc062 (sjaakola                   2015-02-18 08:56:09 +0200 4820)       push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
2bcbc062 (sjaakola                   2015-02-18 08:56:09 +0200 4821)                           ER_WARN_PURGE_LOG_IS_ACTIVE,
2bcbc062 (sjaakola                   2015-02-18 08:56:09 +0200 4822)                           ER(ER_WARN_PURGE_LOG_IS_ACTIVE),
2bcbc062 (sjaakola                   2015-02-18 08:56:09 +0200 4823)                           log_info.log_file_name);
2bcbc062 (sjaakola                   2015-02-18 08:56:09 +0200 4824)
2bcbc062 (sjaakola                   2015-02-18 08:56:09 +0200 4825)   }
2bcbc062 (sjaakola                   2015-02-18 08:56:09 +0200 4826)
2bcbc062 (sjaakola                   2015-02-18 08:56:09 +0200 4827)   if (log_is_in_use)
2bcbc062 (sjaakola                   2015-02-18 08:56:09 +0200 4828)   {
2bcbc062 (sjaakola                   2015-02-18 08:56:09 +0200 4829)     int no_of_log_files_to_purge= no_of_log_files_purged+1;
2bcbc062 (sjaakola                   2015-02-18 08:56:09 +0200 4830)     while (strcmp(log_file_name, log_info.log_file_name))
2bcbc062 (sjaakola                   2015-02-18 08:56:09 +0200 4831)     {
2bcbc062 (sjaakola                   2015-02-18 08:56:09 +0200 4832)       if (mysql_file_stat(m_key_file_log, log_info.log_file_name,
2bcbc062 (sjaakola                   2015-02-18 08:56:09 +0200 4833)                           &stat_area, MYF(0)))
2bcbc062 (sjaakola                   2015-02-18 08:56:09 +0200 4834)       {
2bcbc062 (sjaakola                   2015-02-18 08:56:09 +0200 4835)         if (stat_area.st_mtime < purge_time)
2bcbc062 (sjaakola                   2015-02-18 08:56:09 +0200 4836)           no_of_log_files_to_purge++;
philip-galera commented 9 years ago

I have disabled the two affected tests. Please reenable them when you fix the problem:

diff --git a/mysql-test/suite/binlog/t/disabled.def b/mysql-test/suite/binlog/t/disabled.def
index 888298b..b743828 100644
--- a/mysql-test/suite/binlog/t/disabled.def
+++ b/mysql-test/suite/binlog/t/disabled.def
@@ -9,3 +9,5 @@
 #  Do not use any TAB characters for whitespace.
 #
 ##############################################################################
+
+binlog_index : codership/mysql-wsrep##71 Regression: Duplicate "file was not purged because it is the active log file" warning
diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def
index fd07c96..e0920dd 100644
--- a/mysql-test/suite/rpl/t/disabled.def
+++ b/mysql-test/suite/rpl/t/disabled.def
@@ -14,3 +14,4 @@ rpl_row_create_table      : Bug#11759274 2010-02-27 andrei failed different way
 rpl_delayed_slave         : Bug#11764654 2010-11-09 andrei rpl_delayed_slave fails sporadically in pb
 rpl_row_binlog_max_cache_size : BUG#14126780 May 29 2012 Vasil Dimov timeout if est number of rows is 3 instead of 4
 rpl_test_framework        : Too many servers started, so fails under Galera-enabled MTR
+rpl_rotate_logs : codership/mysql-wsrep##71 Regression: Duplicate "file was not purged because it is the active log file" warning