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 failing SQL when batched execution fails with RTE like StaleStateException #1544

Conversation

findepi
Copy link
Contributor

@findepi findepi commented Sep 2, 2016

Currently, when using batched updates and Hibernate detects stale state (e.g. data row concurrently deleted or deleted by JPQL executed with NO_FLUSH), failing SQL is not logged. However, when SQLException occurs, the failing SQL is logged (and that's so much convenient!).

This patch changes how we handle non-SQLException exception when executing batch, so that current SQL is logged for them as well.

@vladmihalcea
Copy link
Contributor

Thanks for the Pull Request. Please create a JIRA issue and make sure that you sign the CLA as well.

Log failing SQL when batched execution fails with RuntimeException like
StaleStateException.
@findepi findepi force-pushed the log-failing-sql-when-batch-StaleStateException branch from 0581423 to 5710f82 Compare September 2, 2016 12:48
@findepi
Copy link
Contributor Author

findepi commented Sep 2, 2016

@vladmihalcea I've created https://hibernate.atlassian.net/browse/HHH-11082 and updated commit message accordingly. Yes, I've signed CLA.

@vladmihalcea
Copy link
Contributor

Thanks

@findepi
Copy link
Contributor Author

findepi commented Sep 5, 2016

@vladmihalcea this is now ready for review.

@vladmihalcea
Copy link
Contributor

Thanks for the PR. I applied it upstream.

@findepi
Copy link
Contributor Author

findepi commented Sep 5, 2016

Thanks!

@findepi findepi deleted the log-failing-sql-when-batch-StaleStateException branch September 5, 2016 14:15
dantewang added a commit to dantewang/liferay-portal that referenced this pull request Jul 1, 2021
dantewang added a commit to dantewang/liferay-portal that referenced this pull request Jul 2, 2021
yuhai pushed a commit to yuhai/liferay-portal that referenced this pull request Jul 5, 2021
dantewang added a commit to dantewang/liferay-portal that referenced this pull request Jul 6, 2021
yuhai pushed a commit to yuhai/liferay-portal that referenced this pull request Jul 6, 2021
dantewang added a commit to dantewang/liferay-portal that referenced this pull request Jul 7, 2021
dantewang added a commit to dantewang/liferay-portal that referenced this pull request Jul 16, 2021
dantewang added a commit to dantewang/liferay-portal that referenced this pull request Jul 19, 2021
dantewang added a commit to dantewang/liferay-portal that referenced this pull request Jul 29, 2021
dantewang added a commit to dantewang/liferay-portal that referenced this pull request Aug 19, 2021
yuhai pushed a commit to yuhai/liferay-portal that referenced this pull request Sep 13, 2021
yuhai pushed a commit to yuhai/liferay-portal that referenced this pull request Dec 15, 2021
yuhai pushed a commit to yuhai/liferay-portal that referenced this pull request Dec 16, 2021
yuhai pushed a commit to yuhai/liferay-portal that referenced this pull request Dec 21, 2021
yuhai pushed a commit to yuhai/liferay-portal that referenced this pull request Dec 22, 2021
yuhai pushed a commit to yuhai/liferay-portal that referenced this pull request Jan 17, 2022
yuhai pushed a commit to yuhai/liferay-portal that referenced this pull request Jan 19, 2022
yuhai pushed a commit to yuhai/liferay-portal that referenced this pull request Jan 21, 2022
yuhai pushed a commit to yuhai/liferay-portal that referenced this pull request Jan 28, 2022
yuhai pushed a commit to yuhai/liferay-portal that referenced this pull request Feb 8, 2022
yuhai pushed a commit to yuhai/liferay-portal that referenced this pull request Feb 15, 2022
dantewang added a commit to dantewang/liferay-portal that referenced this pull request Feb 21, 2022
dantewang added a commit to dantewang/liferay-portal that referenced this pull request Feb 22, 2022
dantewang added a commit to dantewang/liferay-portal that referenced this pull request Feb 22, 2022
dantewang added a commit to dantewang/liferay-portal that referenced this pull request Feb 23, 2022
dantewang added a commit to dantewang/liferay-portal that referenced this pull request Feb 23, 2022
dantewang added a commit to dantewang/liferay-portal that referenced this pull request Mar 1, 2022
dantewang added a commit to dantewang/liferay-portal that referenced this pull request Mar 2, 2022
dantewang added a commit to dantewang/liferay-portal that referenced this pull request Mar 7, 2022
…because SQLExceptions in BatchingBatch are logged twice -- see hibernate/hibernate-orm#1544
dantewang added a commit to dantewang/liferay-portal that referenced this pull request Mar 8, 2022
…because SQLExceptions in BatchingBatch are logged twice -- see hibernate/hibernate-orm#1544
dantewang added a commit to dantewang/liferay-portal that referenced this pull request Mar 10, 2022
…because SQLExceptions in BatchingBatch are logged twice -- see hibernate/hibernate-orm#1544
yuhai pushed a commit to yuhai/liferay-portal that referenced this pull request Mar 16, 2022
…because SQLExceptions in BatchingBatch are logged twice -- see hibernate/hibernate-orm#1544
dantewang added a commit to dantewang/liferay-portal that referenced this pull request Mar 17, 2022
…because SQLExceptions in BatchingBatch are logged twice -- see hibernate/hibernate-orm#1544
dantewang added a commit to dantewang/liferay-portal that referenced this pull request Mar 18, 2022
…because SQLExceptions in BatchingBatch are logged twice -- see hibernate/hibernate-orm#1544
dantewang added a commit to dantewang/liferay-portal that referenced this pull request Mar 23, 2022
…because SQLExceptions in BatchingBatch are logged twice -- see hibernate/hibernate-orm#1544
dantewang added a commit to dantewang/liferay-portal that referenced this pull request Mar 31, 2022
…because SQLExceptions in BatchingBatch are logged twice -- see hibernate/hibernate-orm#1544
dantewang added a commit to dantewang/liferay-portal that referenced this pull request Apr 7, 2022
…ing in BatchingBatch. SQLExceptions in BatchingBatch are logged twice -- see hibernate/hibernate-orm#1544.
shuyangzhou pushed a commit to shuyangzhou/liferay-portal that referenced this pull request Apr 8, 2022
…ing in BatchingBatch. SQLExceptions in BatchingBatch are logged twice -- see hibernate/hibernate-orm#1544.
brianchandotcom pushed a commit to brianchandotcom/liferay-portal that referenced this pull request Apr 9, 2022
…ing in BatchingBatch. SQLExceptions in BatchingBatch are logged twice -- see hibernate/hibernate-orm#1544.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants