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):
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
11:45:32,988 ERROR [org.jboss.seam.exception.Exceptions] (http-/127.0.0.1:8080-3) handled and logged exception: javax.el.ELException: org.jboss.seam.core.LockTimeoutException: could not acquire lock on @Synchronized component: projectIterationFilesAction
A cancelled upload, or the button should be closing the dialog only.
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-/127.0.0.1:8080-5) HHH020008: Cache[org.zanata.model.HTextFlow.targets] Key[org.zanata.model.HTextFlow.targets#34143] Lockable[(null)]
The Cancel button in question is not for aborting the process, but for closing the dialog.
Retest after Multi-file Upload RFE https://github.com/zanata/zanata-server/pull/400 is merged.
Fixed by https://github.com/zanata/zanata-server/commit/5b76932142d18da8ab16a5d4a08acbd58d72ed37