List:Commits« Previous MessageNext Message »
From:Vladislav Vaintroub Date:August 14 2008 2:08pm
Subject:bzr commit into mysql-6.0-falcon branch (vvaintroub:2781)
View as plain text  
#At file:///C:/bzr/mysql-6.0-falcon-team/

 2781 Vladislav Vaintroub	2008-08-14
      Falcon_bug_37080 timeout on pushbuild.
      The timeout is due to long sleep interval in waitForWriteComplete
      (0.5 sec). 
      We have a test that does 10000 TRUNCATE's and if each truncate would 
      be waiting for writeComplete, it could take as much as 83 minutes for
      the test to complete.
      
      To fix, I decreased sleep interval in waitForWriteComplete to 10 millis,
      and decreased the number of loops in falcon_bug_37080 to 1000.
modified:
  mysql-test/suite/falcon/t/falcon_bug_37080.test
  storage/falcon/TransactionManager.cpp

per-file messages:
  mysql-test/suite/falcon/t/falcon_bug_37080.test
    fix line-endings (LF , not CRLF)
    make loop smaller 1000 iterations instead of 10000
    so the test runs quick.
  storage/falcon/TransactionManager.cpp
    waitForWriteComplete - changed sleep interval from 500 millis to 10 millis. 
    Long sleep interval  is no good if we have a test that does 10000 TRUNCATES.
=== modified file 'mysql-test/suite/falcon/t/falcon_bug_37080.test'
--- a/mysql-test/suite/falcon/t/falcon_bug_37080.test	2008-08-04 15:53:52 +0000
+++ b/mysql-test/suite/falcon/t/falcon_bug_37080.test	2008-08-14 12:08:37 +0000
@@ -1,50 +1,50 @@
---source include/have_falcon.inc
-
-#
-# Bug#37080: Falcon deadlock on parallel TRUNCATE  and INSERT
-#
---echo *** Bug #37080 ***
-
-# ----------------------------------------------------- #
-# --- Initialisation                                --- #
-# ----------------------------------------------------- #
-let $engine = 'Falcon';
-eval SET @@storage_engine = $engine;
-
---disable_warnings
-DROP TABLE IF EXISTS t1;
---enable_warnings
-
-CREATE TABLE t1(a int);
-connect (conn1,localhost,root,,);
-
-# ----------------------------------------------------- #
-# --- Test                                          --- #
-# ----------------------------------------------------- #
-
-let $num=10000;
---disable_query_log
-while ($num)
-{
-   connection conn1;
-   --send insert into t1 values(1), (3), (5), (7) , (11);
-   connection default;
-   --send truncate table t1;
-   connection conn1;
-   --error 0,ER_CANT_LOCK
-   --reap
-   connection default;
-   --error 0,ER_CANT_LOCK
-   --reap 
-   dec $num;
-}
---enable_query_log
-
-# ----------------------------------------------------- #
-# --- Check                                         --- #
-# ----------------------------------------------------- #
-
-# ----------------------------------------------------- #
-# --- Final cleanup                                 --- #
-# ----------------------------------------------------- #
-DROP TABLE t1;
+--source include/have_falcon.inc
+
+#
+# Bug#37080: Falcon deadlock on parallel TRUNCATE  and INSERT
+#
+--echo *** Bug #37080 ***
+
+# ----------------------------------------------------- #
+# --- Initialisation                                --- #
+# ----------------------------------------------------- #
+let $engine = 'Falcon';
+eval SET @@storage_engine = $engine;
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1(a int);
+connect (conn1,localhost,root,,);
+
+# ----------------------------------------------------- #
+# --- Test                                          --- #
+# ----------------------------------------------------- #
+
+let $num=1000;
+--disable_query_log
+while ($num)
+{
+   connection conn1;
+   --send insert into t1 values(1), (3), (5), (7) , (11);
+   connection default;
+   --send truncate table t1;
+   connection conn1;
+   --error 0,ER_CANT_LOCK
+   --reap
+   connection default;
+   --error 0,ER_CANT_LOCK
+   --reap 
+   dec $num;
+}
+--enable_query_log
+
+# ----------------------------------------------------- #
+# --- Check                                         --- #
+# ----------------------------------------------------- #
+
+# ----------------------------------------------------- #
+# --- Final cleanup                                 --- #
+# ----------------------------------------------------- #
+DROP TABLE t1;

=== modified file 'storage/falcon/TransactionManager.cpp'
--- a/storage/falcon/TransactionManager.cpp	2008-08-13 10:18:40 +0000
+++ b/storage/falcon/TransactionManager.cpp	2008-08-14 12:08:37 +0000
@@ -200,7 +200,7 @@ void TransactionManager::waitForWriteCom
 			return;
 
 		committedTrans.unlock();
-		Thread::getThread("TransactionManager::waitForWriteComplete")->sleep(500);
+		Thread::getThread("TransactionManager::waitForWriteComplete")->sleep(10);
 		}
 }
 void TransactionManager::commitByXid(int xidLength, const UCHAR* xid)

Thread
bzr commit into mysql-6.0-falcon branch (vvaintroub:2781) Vladislav Vaintroub14 Aug