{"action":"closed","number":13560,"pull_request":{"url":"https://api.github.com/repos/spring-projects/spring-boot/pulls/13560","id":196916405,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2OTE2NDA1","html_url":"https://github.com/spring-projects/spring-boot/pull/13560","diff_url":"https://github.com/spring-projects/spring-boot/pull/13560.diff","patch_url":"https://github.com/spring-projects/spring-boot/pull/13560.patch","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/13560","number":13560,"state":"closed","locked":false,"title":"Liquibase Endpoint is not resetting autoCommit property","user":{"login":"dmsergeev","id":20231084,"node_id":"MDQ6VXNlcjIwMjMxMDg0","avatar_url":"https://avatars0.githubusercontent.com/u/20231084?v=4","gravatar_id":"","url":"https://api.github.com/users/dmsergeev","html_url":"https://github.com/dmsergeev","followers_url":"https://api.github.com/users/dmsergeev/followers","following_url":"https://api.github.com/users/dmsergeev/following{/other_user}","gists_url":"https://api.github.com/users/dmsergeev/gists{/gist_id}","starred_url":"https://api.github.com/users/dmsergeev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmsergeev/subscriptions","organizations_url":"https://api.github.com/users/dmsergeev/orgs","repos_url":"https://api.github.com/users/dmsergeev/repos","events_url":"https://api.github.com/users/dmsergeev/events{/privacy}","received_events_url":"https://api.github.com/users/dmsergeev/received_events","type":"User","site_admin":false},"body":"The Liquibase Actuator Endpoint is not closing the connection properly--It's doing it by calling `connection.close()`, however this does not revert the `autoCommit` property which is set to `false` by Liquibase in `AbstractJdbcDatabase` class, leading to the connection returning to the pool with an ongoing transaction, which has devastating effects since this connection is reused by the application, making all subsequent queries  execute in the context of that transaction, which remains indefinitely open(default for postgres). Once the application is terminated the transaction is rolled back destroying all changes. \r\n\r\nThis fix addresses this by closing the `database` object which in turn closes the connection.\r\n\r\nFor more details please see: https://github.com/liquibase/liquibase/pull/63\r\nTo see how Liquibase itself closes connection on schema update at the start of the application please see `SpringLiquibase.afterPropertiesSet` method\r\n\r\nTo reproduce this issue you can simply start a Spring Boot application with Liquibase enabled and call the actuator, then examine the active transactions in your RDBMS. For postgres it would be pg_stat_activity, you will see the state being changed from 'idle' to 'idle in transaction' on the next database health check or any query performed by the application.\r\n\r\nAll versions of Spring Boot are affected. Here's the PR for 1.5.x: https://github.com/spring-projects/spring-boot/pull/13559","created_at":"2018-06-23T19:04:47Z","updated_at":"2018-06-24T06:35:02Z","closed_at":"2018-06-24T06:35:01Z","merged_at":null,"merge_commit_sha":"dc67a88d0784fd4a3adeeb2d449971679cba7d21","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":293438798,"node_id":"MDU6TGFiZWwyOTM0Mzg3OTg=","url":"https://api.github.com/repos/spring-projects/spring-boot/labels/status:%20waiting-for-triage","name":"status: waiting-for-triage","color":"fef2c0","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/spring-projects/spring-boot/pulls/13560/commits","review_comments_url":"https://api.github.com/repos/spring-projects/spring-boot/pulls/13560/comments","review_comment_url":"https://api.github.com/repos/spring-projects/spring-boot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/13560/comments","statuses_url":"https://api.github.com/repos/spring-projects/spring-boot/statuses/0873758d3739e61a42ba62f2f646dea34066c9ca","head":{"label":"dmsergeev:liquibase-endpoint-fix","ref":"liquibase-endpoint-fix","sha":"0873758d3739e61a42ba62f2f646dea34066c9ca","user":{"login":"dmsergeev","id":20231084,"node_id":"MDQ6VXNlcjIwMjMxMDg0","avatar_url":"https://avatars0.githubusercontent.com/u/20231084?v=4","gravatar_id":"","url":"https://api.github.com/users/dmsergeev","html_url":"https://github.com/dmsergeev","followers_url":"https://api.github.com/users/dmsergeev/followers","following_url":"https://api.github.com/users/dmsergeev/following{/other_user}","gists_url":"https://api.github.com/users/dmsergeev/gists{/gist_id}","starred_url":"https://api.github.com/users/dmsergeev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmsergeev/subscriptions","organizations_url":"https://api.github.com/users/dmsergeev/orgs","repos_url":"https://api.github.com/users/dmsergeev/repos","events_url":"https://api.github.com/users/dmsergeev/events{/privacy}","received_events_url":"https://api.github.com/users/dmsergeev/received_events","type":"User","site_admin":false},"repo":{"id":138424437,"node_id":"MDEwOlJlcG9zaXRvcnkxMzg0MjQ0Mzc=","name":"spring-boot","full_name":"dmsergeev/spring-boot","owner":{"login":"dmsergeev","id":20231084,"node_id":"MDQ6VXNlcjIwMjMxMDg0","avatar_url":"https://avatars0.githubusercontent.com/u/20231084?v=4","gravatar_id":"","url":"https://api.github.com/users/dmsergeev","html_url":"https://github.com/dmsergeev","followers_url":"https://api.github.com/users/dmsergeev/followers","following_url":"https://api.github.com/users/dmsergeev/following{/other_user}","gists_url":"https://api.github.com/users/dmsergeev/gists{/gist_id}","starred_url":"https://api.github.com/users/dmsergeev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmsergeev/subscriptions","organizations_url":"https://api.github.com/users/dmsergeev/orgs","repos_url":"https://api.github.com/users/dmsergeev/repos","events_url":"https://api.github.com/users/dmsergeev/events{/privacy}","received_events_url":"https://api.github.com/users/dmsergeev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dmsergeev/spring-boot","description":"Spring Boot","fork":true,"url":"https://api.github.com/repos/dmsergeev/spring-boot","forks_url":"https://api.github.com/repos/dmsergeev/spring-boot/forks","keys_url":"https://api.github.com/repos/dmsergeev/spring-boot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dmsergeev/spring-boot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dmsergeev/spring-boot/teams","hooks_url":"https://api.github.com/repos/dmsergeev/spring-boot/hooks","issue_events_url":"https://api.github.com/repos/dmsergeev/spring-boot/issues/events{/number}","events_url":"https://api.github.com/repos/dmsergeev/spring-boot/events","assignees_url":"https://api.github.com/repos/dmsergeev/spring-boot/assignees{/user}","branches_url":"https://api.github.com/repos/dmsergeev/spring-boot/branches{/branch}","tags_url":"https://api.github.com/repos/dmsergeev/spring-boot/tags","blobs_url":"https://api.github.com/repos/dmsergeev/spring-boot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dmsergeev/spring-boot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dmsergeev/spring-boot/git/refs{/sha}","trees_url":"https://api.github.com/repos/dmsergeev/spring-boot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dmsergeev/spring-boot/statuses/{sha}","languages_url":"https://api.github.com/repos/dmsergeev/spring-boot/languages","stargazers_url":"https://api.github.com/repos/dmsergeev/spring-boot/stargazers","contributors_url":"https://api.github.com/repos/dmsergeev/spring-boot/contributors","subscribers_url":"https://api.github.com/repos/dmsergeev/spring-boot/subscribers","subscription_url":"https://api.github.com/repos/dmsergeev/spring-boot/subscription","commits_url":"https://api.github.com/repos/dmsergeev/spring-boot/commits{/sha}","git_commits_url":"https://api.github.com/repos/dmsergeev/spring-boot/git/commits{/sha}","comments_url":"https://api.github.com/repos/dmsergeev/spring-boot/comments{/number}","issue_comment_url":"https://api.github.com/repos/dmsergeev/spring-boot/issues/comments{/number}","contents_url":"https://api.github.com/repos/dmsergeev/spring-boot/contents/{+path}","compare_url":"https://api.github.com/repos/dmsergeev/spring-boot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dmsergeev/spring-boot/merges","archive_url":"https://api.github.com/repos/dmsergeev/spring-boot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dmsergeev/spring-boot/downloads","issues_url":"https://api.github.com/repos/dmsergeev/spring-boot/issues{/number}","pulls_url":"https://api.github.com/repos/dmsergeev/spring-boot/pulls{/number}","milestones_url":"https://api.github.com/repos/dmsergeev/spring-boot/milestones{/number}","notifications_url":"https://api.github.com/repos/dmsergeev/spring-boot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dmsergeev/spring-boot/labels{/name}","releases_url":"https://api.github.com/repos/dmsergeev/spring-boot/releases{/id}","deployments_url":"https://api.github.com/repos/dmsergeev/spring-boot/deployments","created_at":"2018-06-23T18:23:05Z","updated_at":"2018-06-23T18:23:22Z","pushed_at":"2018-06-23T19:02:59Z","git_url":"git://github.com/dmsergeev/spring-boot.git","ssh_url":"git@github.com:dmsergeev/spring-boot.git","clone_url":"https://github.com/dmsergeev/spring-boot.git","svn_url":"https://github.com/dmsergeev/spring-boot","homepage":"http://projects.spring.io/spring-boot","size":78477,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"spring-projects:master","ref":"master","sha":"a097f923c1a096090535ef21e23a27fba5edfc07","user":{"login":"spring-projects","id":317776,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNzc3Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/317776?v=4","gravatar_id":"","url":"https://api.github.com/users/spring-projects","html_url":"https://github.com/spring-projects","followers_url":"https://api.github.com/users/spring-projects/followers","following_url":"https://api.github.com/users/spring-projects/following{/other_user}","gists_url":"https://api.github.com/users/spring-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-projects/subscriptions","organizations_url":"https://api.github.com/users/spring-projects/orgs","repos_url":"https://api.github.com/users/spring-projects/repos","events_url":"https://api.github.com/users/spring-projects/events{/privacy}","received_events_url":"https://api.github.com/users/spring-projects/received_events","type":"Organization","site_admin":false},"repo":{"id":6296790,"node_id":"MDEwOlJlcG9zaXRvcnk2Mjk2Nzkw","name":"spring-boot","full_name":"spring-projects/spring-boot","owner":{"login":"spring-projects","id":317776,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxNzc3Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/317776?v=4","gravatar_id":"","url":"https://api.github.com/users/spring-projects","html_url":"https://github.com/spring-projects","followers_url":"https://api.github.com/users/spring-projects/followers","following_url":"https://api.github.com/users/spring-projects/following{/other_user}","gists_url":"https://api.github.com/users/spring-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-projects/subscriptions","organizations_url":"https://api.github.com/users/spring-projects/orgs","repos_url":"https://api.github.com/users/spring-projects/repos","events_url":"https://api.github.com/users/spring-projects/events{/privacy}","received_events_url":"https://api.github.com/users/spring-projects/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spring-projects/spring-boot","description":"Spring Boot","fork":false,"url":"https://api.github.com/repos/spring-projects/spring-boot","forks_url":"https://api.github.com/repos/spring-projects/spring-boot/forks","keys_url":"https://api.github.com/repos/spring-projects/spring-boot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spring-projects/spring-boot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spring-projects/spring-boot/teams","hooks_url":"https://api.github.com/repos/spring-projects/spring-boot/hooks","issue_events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/events{/number}","events_url":"https://api.github.com/repos/spring-projects/spring-boot/events","assignees_url":"https://api.github.com/repos/spring-projects/spring-boot/assignees{/user}","branches_url":"https://api.github.com/repos/spring-projects/spring-boot/branches{/branch}","tags_url":"https://api.github.com/repos/spring-projects/spring-boot/tags","blobs_url":"https://api.github.com/repos/spring-projects/spring-boot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spring-projects/spring-boot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spring-projects/spring-boot/git/refs{/sha}","trees_url":"https://api.github.com/repos/spring-projects/spring-boot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spring-projects/spring-boot/statuses/{sha}","languages_url":"https://api.github.com/repos/spring-projects/spring-boot/languages","stargazers_url":"https://api.github.com/repos/spring-projects/spring-boot/stargazers","contributors_url":"https://api.github.com/repos/spring-projects/spring-boot/contributors","subscribers_url":"https://api.github.com/repos/spring-projects/spring-boot/subscribers","subscription_url":"https://api.github.com/repos/spring-projects/spring-boot/subscription","commits_url":"https://api.github.com/repos/spring-projects/spring-boot/commits{/sha}","git_commits_url":"https://api.github.com/repos/spring-projects/spring-boot/git/commits{/sha}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/comments{/number}","issue_comment_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments{/number}","contents_url":"https://api.github.com/repos/spring-projects/spring-boot/contents/{+path}","compare_url":"https://api.github.com/repos/spring-projects/spring-boot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spring-projects/spring-boot/merges","archive_url":"https://api.github.com/repos/spring-projects/spring-boot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spring-projects/spring-boot/downloads","issues_url":"https://api.github.com/repos/spring-projects/spring-boot/issues{/number}","pulls_url":"https://api.github.com/repos/spring-projects/spring-boot/pulls{/number}","milestones_url":"https://api.github.com/repos/spring-projects/spring-boot/milestones{/number}","notifications_url":"https://api.github.com/repos/spring-projects/spring-boot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/labels{/name}","releases_url":"https://api.github.com/repos/spring-projects/spring-boot/releases{/id}","deployments_url":"https://api.github.com/repos/spring-projects/spring-boot/deployments","created_at":"2012-10-19T15:02:57Z","updated_at":"2018-06-24T04:50:52Z","pushed_at":"2018-06-23T19:04:47Z","git_url":"git://github.com/spring-projects/spring-boot.git","ssh_url":"git@github.com:spring-projects/spring-boot.git","clone_url":"https://github.com/spring-projects/spring-boot.git","svn_url":"https://github.com/spring-projects/spring-boot","homepage":"http://projects.spring.io/spring-boot","size":78475,"stargazers_count":25933,"watchers_count":25933,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":19128,"mirror_url":null,"archived":false,"open_issues_count":411,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":19128,"open_issues":411,"watchers":25933,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spring-projects/spring-boot/pulls/13560"},"html":{"href":"https://github.com/spring-projects/spring-boot/pull/13560"},"issue":{"href":"https://api.github.com/repos/spring-projects/spring-boot/issues/13560"},"comments":{"href":"https://api.github.com/repos/spring-projects/spring-boot/issues/13560/comments"},"review_comments":{"href":"https://api.github.com/repos/spring-projects/spring-boot/pulls/13560/comments"},"review_comment":{"href":"https://api.github.com/repos/spring-projects/spring-boot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spring-projects/spring-boot/pulls/13560/commits"},"statuses":{"href":"https://api.github.com/repos/spring-projects/spring-boot/statuses/0873758d3739e61a42ba62f2f646dea34066c9ca"}},"author_association":"NONE","merged":false,"mergeable":true,"rebaseable":true,"mergeable_state":"clean","merged_by":null,"comments":1,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":6,"deletions":2,"changed_files":1}}
{"actor":{"display_login":"wilkinsona"}}