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

Improvement to reduce MSSQL deadlocks #2985

Merged
merged 8 commits into from Dec 13, 2017

Conversation

Projects
None yet
2 participants
@jtobard
Contributor

jtobard commented Dec 8, 2017

This is a duplicated PR from #2984 to test Travis integration

Added Database cache by default:

hibernate {
	cache.use_query_cache = true
	cache.queries = true

This can be removed and use directly from rundeck-config.properties using:

hibernate.cache.queries=true
hibernate.cache.use_query_cache=true

The count query of executions by job id is reported to create deadlocks too, so, according to Microsoft documentation this can be reduced using the lowest isolation level:

total = Execution.withTransaction([isolationLevel: TransactionDefinition.ISOLATION_READ_UNCOMMITTED]) {
                Execution.countByScheduledExecution(scheduledExecution)
            }

Also, on bulk delete removed the flush after each execution delete, that slightly reduces the deadlock meanwhile the bulk deleted is executed.

Microsoft documentation:

https://technet.microsoft.com/en-us/library/ms177453(v=sql.105).aspx
https://technet.microsoft.com/en-us/library/ms191242(v=sql.105).aspx

@gschueler gschueler added this to the 2.10.2 milestone Dec 12, 2017

@gschueler gschueler merged commit 243a35a into rundeck:master Dec 13, 2017

9 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
security/snyk No new issues
Details
security/snyk - build.gradle No new issues
Details
security/snyk - core/build.gradle No new issues
Details
security/snyk - rundeck-launcher/build.gradle No new issues
Details
security/snyk - rundeck-launcher/launcher/build.gradle No new issues
Details
security/snyk - rundeck-launcher/rundeck-jetty-server/build.gradle No new issues
Details
security/snyk - rundeck-storage/build.gradle No new issues
Details
security/snyk - rundeckapp/build.gradle No new issues
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment