Details
-
Bug
-
Resolution: Fixed
-
Low
-
7.2.0, 7.6.4, 7.8.0
-
7.02
-
Severity 2 - Major
-
Description
Summary
In some rare cases, getting of lexorank row through DB may take more than 4 seconds.
Environment
- Any plugin to create on subtasks on transition
- Some other long-running transition postfunction
Steps to Reproduce
- Perform long-running transition
- Simultaneously try to create issue.
Expected Results
rankInitially fails with 4sec timeout
Actual Results
rankInitially waits for transition to finish.
Explanation
LexorankDao#acquireLock is supposed to finish to either succeed or fail immediately. And then there's a lot of error handling about this.
But in case in some other transaction holds an SQL update lock, acquireLock query will wait for that transition to finish.
Proposed solution
The best way would be to use SELECT FOR UPDATE NOWAIT. It will properly represent tryLock nature of acquireLock. Unfortunately, it is not supported by mysql. (https://dev.mysql.com/worklog/task/?id=3597)
A bit worse option: use Statement#setQueryTimeout(int) from JDBC. It won't exit immideately, but at least it will fail after some time instead of waiting infinitely.
We are going with the second option
Workaround
- None
Attachments
Issue Links
- relates to
-
JSWSERVER-15834 Lexorank operation can fail for 10 minutes and cause communication breakdown when creating multiple subtasks on transition with 3rd party plugins
- Closed
- was cloned as
-
RUM-2004 Loading...