Project

General

Profile

Actions

Defect #5683

open

Project copy Lock wait timeout

Added by Kazuki Kudo over 14 years ago. Updated over 14 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Projects
Target version:
-
Start date:
2010-06-14
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

CSV download of a lot of tickets is carried out.
Project copy is performed during download execution.

ActiveRecord::StatementInvalid (Mysql::Error: Lock wait timeout exceeded; try restarting transaction: 
UPDATE `projects` SET `lft` = CASE WHEN `lft` BETWEEN 197 AND 284 THEN `lft` + 286 - 284 
WHEN `lft` BETWEEN 285 AND 286 THEN `lft` + 197 - 285 ELSE `lft` END,
 `rgt` = CASE WHEN `rgt` BETWEEN 197 AND 284 THEN `rgt` + 286 - 284 WHEN `rgt` BETWEEN 285 AND 286 THEN `rgt` + 197 - 285 ELSE `rgt` END,
 `parent_id` = CASE WHEN id = 146 THEN NULL ELSE `parent_id` END ):
  app/models/project.rb:300:in `set_parent!'
  app/models/project.rb:278:in `set_allowed_parent!'
  app/controllers/projects_controller.rb:108:in `copy'
  passenger (2.2.11) lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
  passenger (2.2.11) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
  passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:418:in `start_request_handler'

Setup of parents is not completed.
It seems that transaction management is wrong.

Setup of parents is not included in a transaction scope.


Files

table_status.txt (15 KB) table_status.txt table status Kazuki Kudo, 2010-06-22 03:01

Related issues

Related to Redmine - Defect #8143: Problem to update subtaskClosed2011-04-13

Actions
Actions #1

Updated by Holger Just over 14 years ago

This seems to be more of a restriction of MySQL ISAM tables than a Redmine restriction.

As MyISAM does not support transaction, they are emulated using locks. The issue should vanish if you use a DBMS with proper transaction support (e.g. PostgreSQL or MySQL with InnoDB)

Actions #2

Updated by Kazuki Kudo over 14 years ago

Hello.

Thank you for your reply.

This seems to be more of a restriction of MySQL ISAM tables than a
Redmine restriction.

It is confirming.
I am using InnoDB.
The result of table status is attached.

Best Regards.

Kazuki Kudo.

Actions

Also available in: Atom PDF