Skip to content

Do not proxy the JobExplorer by default #4237

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

Closed
wants to merge 1 commit into from
Closed

Do not proxy the JobExplorer by default #4237

wants to merge 1 commit into from

Conversation

hpoettker
Copy link
Contributor

@hpoettker hpoettker commented Nov 17, 2022

To resolve #1307 and #4195, the possibility to wrap the SimpleJobExplorer in a transactional proxy was added. In addition, a new behavior was introduced to use such a proxy also by default with transaction propagation SUPPORTS and isolation level READ_COMMITTED.

This default behavior causes the issue #4230, i.e. it produces warnings that are harmless but might confuse many.

This PR proposes to return the default behavior to the previous behavior, i.e. no transactional proxy for the JobExplorer. As the JobExplorer is read-only, the difference between no transaction and the combination of SUPPORTS and READ_COMMITTED seems negligible to me for most cases. And the possibility for the user to add a transactional proxy still exists if required.

The commit for this PR does not build successfully. But this is independent of the PR and dealt with in #4236.

@hpoettker
Copy link
Contributor Author

I've rebased after #4236 has been merged. The build of the branch is now successful.

@fmbenhassine
Copy link
Contributor

Thank you for your PR. The suggested change introduces an inconsistency between how the JobRepository and JobOperator are configured compared to the JobExplorer. With this change, one would need to provide a transaction attributes instance to create a transactional proxy around the JobExplorer, while it is not the case with the JobRepository and JobOperator. So for consistency, I think the provided JobExplorer should remain transactional by default (so that users are not required to make it transactional), but we need to review the defaults.

I think the issue is that the current default isolation level of READ_COMMITTED is not correct. It should rather be DEFAULT. With this new default, the warning is not logged.

Do you agree? If yes, I can take care of the change to fix #4230.

@fmbenhassine fmbenhassine added the status: waiting-for-reporter Issues for which we are waiting for feedback from the reporter label Nov 22, 2022
@hpoettker
Copy link
Contributor Author

Thanks for the detailed feedback!

In fact, I think that it's most important that these warnings are not logged in standard use cases. If isolation level DEFAULT achieves this, then it's a good solution. Please feel free to decline this PR.

@fmbenhassine fmbenhassine removed this from the 5.0.0 milestone Nov 23, 2022
@fmbenhassine
Copy link
Contributor

Closing this in favour of changing the default isolation level to DEFAULT, which fixes the issue. Thank you for your contribution anyway!

@hpoettker hpoettker deleted the no-proxy-by-default-for-job-explorer branch May 7, 2024 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core pr-for: bug status: waiting-for-reporter Issues for which we are waiting for feedback from the reporter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support to configure the transaction manager in SimpleJobExplorer
2 participants