Bug 1033439 - Adding a project to a group while a file upload is in progress causes a transaction failure
Summary: Adding a project to a group while a file upload is in progress causes a trans...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Zanata
Classification: Retired
Component: Component-Logic
Version: development
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Alex Eng
QA Contact: Zanata-QA Mailling List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-22 05:54 UTC by Damian Jansen
Modified: 2014-02-13 02:25 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-02-13 02:25:50 UTC


Attachments (Terms of Use)
Test run log file (126.05 KB, text/x-log)
2013-11-22 05:54 UTC, Damian Jansen
no flags Details

Description Damian Jansen 2013-11-22 05:54:33 UTC
Created attachment 827570 [details]
Test run log file

Description of problem:
If someone starts uploading a large source doc file to a project, and someone else adds _any_ project to a group, a transaction failure will occur

Version-Release number of selected component (if applicable):
dev

How reproducible:
Moderate, consistent

Steps to Reproduce:
1. Sign in as admin
2. Open a tab on Groups, select a group
3. Open another tab on Project, select a project
4. On the project page, press Source documents, upload and select a large file to upload
  - e.g. Moby Dick from project Gutenberg
5. Press Upload
6. Go to the group tab and press Settings -> Projects
7. Enter a project name and press Add

Actual results:
Transaction failed
An unexpected error has occurred. Please report this problem with details of what you were attempting. 

Expected results:
No lock problems should be evident on a db read

Additional info:
Attached server log
The file upload target project and group add target project do not need to be one and the same, it seems.

Comment 1 Alex Eng 2013-11-25 01:48:23 UTC
Pull request:
https://github.com/zanata/zanata-server/pull/292

Comment 2 Alex Eng 2013-11-25 01:49:12 UTC
Ignore pull request information above. Wrong update.

Comment 3 Damian Jansen 2013-11-25 02:19:35 UTC
Does not occur using a mysql database, only on h2. Downgrading severity.

Comment 4 Alex Eng 2013-11-25 21:22:22 UTC
After discussion, due to the new group statistics page have only word based statistics, we have decided to remove the overall messages count from the page which is the cause of this issue from Zanata 3.2 release.

However, we should decide as a separate feature if we are going to include message statistics in the page.

Comment 5 Alex Eng 2013-11-25 21:30:31 UTC
pull request:
https://github.com/zanata/zanata-server/pull/295

Comment 6 Damian Jansen 2013-11-26 03:42:55 UTC
This appears to still be a problem. I noticed that I had to clear the caches for it to occur (i.e. will only happen the first time)

Comment 7 Damian Jansen 2013-11-26 04:51:21 UTC
The problem is caused by databases that force pessimistic lock - e.g. h2 database does not support optimistic locking.

Despite not officially supporting anything other than mysql, it would be appropriate to handle these situations gracefully - and should be mentioned in the documentation for those who may wish to attempt databases other than mysql.

Comment 8 Damian Jansen 2014-02-13 02:25:50 UTC
h2 not supported


Note You need to log in before you can comment on or make changes to this bug.