Bug 994293

Summary: Cancelling an upload causes a database lock exception
Product: [Retired] Zanata Reporter: Damian Jansen <djansen>
Component: Component-LogicAssignee: Damian Jansen <djansen>
Status: CLOSED CURRENTRELEASE QA Contact: Damian Jansen <djansen>
Severity: medium Docs Contact:
Priority: medium    
Version: developmentCC: zanata-bugs
Target Milestone: ---   
Target Release: 3.5   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: 3.5.0-SNAPSHOT (git-jenkins-zanata-server-github-pull-requests-1862) Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-26 23:27:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 994362    

Description Damian Jansen 2013-08-07 01:59:54 UTC
Description of problem:
There are two possible outcomes of cancelling a Source Document upload.
- The upload fails and the user is given an Error display
- The upload continues and succeeds, but a subsequent upload will fail not being able to access the lock

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

How reproducible:
Intermittent, easy to reproduce

Steps to Reproduce:
Pre: A reasonably large file, say 2MB, is available. I used Moby Dick txt from Gutenberg
1. Go to Project Version, Source Documents
2. Press Upload Document
3. Select the test file
4. Press upload, and after a second, press Cancel
5. Repeat 2 - 4 until error occurs

Actual results:
Error page:-
11:45:32,988 ERROR [org.jboss.seam.exception.Exceptions] (http-/ handled and logged exception: javax.el.ELException: org.jboss.seam.core.LockTimeoutException: could not acquire lock on @Synchronized component: projectIterationFilesAction

Expected results:
A cancelled upload, or the button should be closing the dialog only.

Additional info:
Once, I got a bunch of lines like this:-
A soft-locked cache entry was expired by the underlying Ehcache. If this happens regularly you should consider increasing the cache timeouts and/or capacity limits
11:24:25,165 WARN  [org.hibernate.cache.ehcache.internal.strategy.AbstractReadWriteEhcacheAccessStrategy] (http-/ HHH020008: Cache[org.zanata.model.HTextFlow.targets] Key[org.zanata.model.HTextFlow.targets#34143] Lockable[(null)]

Comment 1 Damian Jansen 2013-08-12 01:00:50 UTC
The Cancel button in question is not for aborting the process, but for closing the dialog.

Comment 2 Damian Jansen 2014-07-24 01:34:58 UTC
Retest after Multi-file Upload RFE https://github.com/zanata/zanata-server/pull/400 is merged.