Test tokudb.locks-select-update-3 is unstable
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.5 |
Invalid
|
Undecided
|
Unassigned | |||
5.6 |
Opinion
|
Low
|
Unassigned | |||
5.7 |
Opinion
|
Low
|
Unassigned |
Bug Description
On 5.6 trunk, ASan build:
tokudb.
Test ended at 2017-02-06 14:16:01
CURRENT_TEST: tokudb.
mysqltest: At line 27: query 'reap' failed: 1205: Lock wait timeout exceeded; try restarting transaction
The result from queries just before the failure was:
SET DEFAULT_
drop table if exists t;
create table t (a int primary key, b int);
insert into t values (1,0);
set session transaction isolation level read committed;
begin;
select * from t where a=1 for update;
a b
1 0
update t set b=b+1 where a=1;
set session transaction isolation level read committed;
begin;
select * from t where a=1 for update;
commit;
safe_process[8432]: Child process: 8434, exit: 1
Server [mysqld.1 - pid: 8152, winpid: 8152] log:
Server log from this test:
----------SERVER LOG START-----------
----------SERVER LOG END-------------
tags: | added: ci tokudb |
We are getting the same failure, although rarely. If a machine or a build is very slow, the part where the test switched to the default connection, runs SELECT and COMMIT, and switches back, can take time, and since the default TokuDB lock timeout is only 4 seconds, the timeout occurs. Since the logic of the test is unrelated to the timeout, it makes sense just to set it to a higher value:
diff --git a/storage/ tokudb/ mysql-test/ tokudb/ r/locks- select- update- 3.result b/storage/ tokudb/ mysql-test/ tokudb/ r/locks- select- update- 3.result tokudb/ mysql-test/ tokudb/ r/locks- select- update- 3.result tokudb/ mysql-test/ tokudb/ r/locks- select- update- 3.result lock_timeout= 60000; tokudb/ mysql-test/ tokudb/ t/locks- select- update- 3.test b/storage/ tokudb/ mysql-test/ tokudb/ t/locks- select- update- 3.test tokudb/ mysql-test/ tokudb/ t/locks- select- update- 3.test tokudb/ mysql-test/ tokudb/ t/locks- select- update- 3.test conn1,localhost ,root); lock_timeout= 60000;
index 8b31bf5..c1f05cd 100644
--- a/storage/
+++ b/storage/
@@ -8,6 +8,7 @@ select * from t where a=1 for update;
a b
1 0
update t set b=b+1 where a=1;
+set session tokudb_
set session transaction isolation level read committed;
begin;
select * from t where a=1 for update;
diff --git a/storage/
index a563f06..5b54fa7 100644
--- a/storage/
+++ b/storage/
@@ -15,6 +15,7 @@ select * from t where a=1 for update;
# t2 update
update t set b=b+1 where a=1;
connect(
+set session tokudb_
set session transaction isolation level read committed;
begin;
# t2 select for update, should hang until t1 commits