Details
-
Bug
-
Resolution: Fixed
-
Medium
-
3.0.0, 3.1.0, 3.2.0, 3.3.0, 3.4.0
-
None
-
None
Description
HTR:
- Add an eventListener using reviewService.getReviewDetails() in the event handling thread
@EventListener public void onReviewEvent(final ReviewStateChangedEvent event) { impersonationService.doPrivilegedAction(null, new Operation<Object, RuntimeException>() { @Override public Object perform() throws RuntimeException { return reviewService.getReviewDetails(event.getReviewId()); } }); }
- Create a review through the REST API (POST /rest-service/reviews-v1.json)
- Try to transition the review through the REST API (POST /rest-service/reviews-v1/CR-7/transition?action=action:submitReview)
- The second call never returns
What's happening is that the original transaction is not closed when publishing the event, and requesting revision details for the first time triggers a separate transaction in the retriable thread pool. The two transactions deadlock in the db (tested with postgres) and never return.