Bug 1128549 - If a cancelled version copy unlocks in background, maintainer unlocking throws exception
Summary: If a cancelled version copy unlocks in background, maintainer unlocking throw...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Zanata
Classification: Retired
Component: Component-UI
Version: 3.4
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: 2014-08-11 05:18 UTC by Damian Jansen
Modified: 2015-07-31 01:22 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-07-31 01:22:46 UTC
Embargoed:


Attachments (Terms of Use)
Stack trace of exception (15.88 KB, text/plain)
2014-08-11 05:18 UTC, Damian Jansen
no flags Details

Description Damian Jansen 2014-08-11 05:18:23 UTC
Created attachment 925611 [details]
Stack trace of exception

Description of problem:
If a cancelled version copy is left for long enough, it may unlock in the background. If the maintainer has not refreshed the page, the clicks "Make this version writable", an OptimisticLockException exception will occur.

Version-Release number of selected component (if applicable):
3.5-snap, from https://github.com/zanata/zanata-server/pull/525

How reproducible:
Moderate, always

Steps to Reproduce:
Pre: project version with some reasonable number of documents exists
1. Sign in as a project admin, go to the project
2. Click the v next to a version and select Copy
3. enter a new version name, press create
4. While it is copying, press Stop, press Ok
5. Wait for the Stop button to disappear, and select the version
(if there is no lock icon, you'll need to do 2 - 5 again)
6. Press Settings to show the General Tab
- The "Make this version writable" button should be visible
7. Wait for some time, like a few minutes, then press the button

Actual results:
Transaction failed, another user changed the same data
javax.servlet.ServletException: javax.persistence.OptimisticLockException

Expected results:
It should just "do it" transparently, or issue a "Already ACTIVE" notification.

Additional info:
Stack attached.

Comment 1 Zanata Migrator 2015-07-31 01:22:46 UTC
Migrated; check JIRA for bug status: http://zanata.atlassian.net/browse/ZNTA-469


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