Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log and fix interrupted transactions #16827

Closed
wezell opened this issue Jul 10, 2019 · 2 comments
Closed

Log and fix interrupted transactions #16827

wezell opened this issue Jul 10, 2019 · 2 comments

Comments

@wezell
Copy link
Contributor

wezell commented Jul 10, 2019

We have wrapped almost all of our modern APIs and Factories (those that expect to write to the DB) in our @WrapTransaction annotation. This has been great, as this has proven to provide transactional control at a method level. One issue we have seen is that many API calls that are intended to be transactional actually call other older APIs or legacy code that do not respect any transactions and these older apis can commit and closes connections unexpectedly in what should be an ongoing transaction.

This behavior has been going on since time began at dotCMS and has not had any obvious damaging effects as another DB connection just takes the originals place. But obviously, these unwanted commits are bad behavior and could possibly underlie a number of hard to pin down or unreproducible failures, such as can happen when publishing large bundles.

At the very least, we should log these unwanted transaction commits and fix them when we see them.

wezell added a commit that referenced this issue Jul 10, 2019
wezell added a commit that referenced this issue Jul 10, 2019
wezell added a commit that referenced this issue Jul 10, 2019
wezell added a commit that referenced this issue Jul 10, 2019
wezell added a commit that referenced this issue Jul 10, 2019
@wezell
Copy link
Contributor Author

wezell commented Jul 10, 2019

Out of the box, it will only log the error, but I think for tests we would want to throw an exception so we can find places in code where this happens. You can do this by setting
LOCAL_TRANSACTION_INTERUPTED_ACTION=THROW. If you want to turn off all error logging, just omit the property or set it to
LOCAL_TRANSACTION_INTERUPTED_ACTION=NOTHING

@jgambarios
Copy link
Contributor

PR: #16830

jgambarios pushed a commit that referenced this issue Jul 16, 2019
* #16827 merging

* #16827 run quartz via threads

* #16827-transaction-interuption

* #16827-transaction-interuption

* #16827 -transaction-interuption
dsilvam pushed a commit that referenced this issue Jul 26, 2019
* #16711 support resizing/stop looping animated gifs

* #16711 image editor cleanup

* #16711 updated image editor

* #16711 added icon for webp, allow editing of image url

* #16711 added icon for webp, allow editing of image url

* #16711 almost working

* #16711 using the tempresouce for uploads

* #16711 work

* #16827 merging

* #16827 run quartz via threads

* #16827-transaction-interuption

* #16827-transaction-interuption

* #16827 -transaction-interuption

* #16711 working better

* #16711 revamped image editor

* #16711 loop and frames working

* #16711 did not mean to add this

* #16711 temp files get cleaned up by a cron

* #16711 cleaning up unused classes

* #16711 not working

* #16711 better classes

* #16711 now more animated

* #16711 allow gifs to be transparent
@wezell wezell closed this as completed Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants