{"action":"created","comment":{"url":"https://api.github.com/repos/woothemes/woocommerce/pulls/comments/68742359","id":68742359,"diff_hunk":"@@ -174,7 +178,8 @@ private function get_cache_prefix() {\n \t */\n \tpublic function save_data() {\n \t\t// Dirty if something changed - prevents saving nothing new\n-\t\tif ( $this->_dirty && $this->has_session() ) {\n+\t\t$dataChanged = (serialize($this->_data) != $this->_data_org);","path":"includes/class-wc-session-handler.php","position":23,"original_position":23,"commit_id":"0aaf0a25c90877edce13153812e042a825f11af8","original_commit_id":"0aaf0a25c90877edce13153812e042a825f11af8","user":{"login":"statik-jos","id":15955699,"avatar_url":"https://avatars.githubusercontent.com/u/15955699?v=3","gravatar_id":"","url":"https://api.github.com/users/statik-jos","html_url":"https://github.com/statik-jos","followers_url":"https://api.github.com/users/statik-jos/followers","following_url":"https://api.github.com/users/statik-jos/following{/other_user}","gists_url":"https://api.github.com/users/statik-jos/gists{/gist_id}","starred_url":"https://api.github.com/users/statik-jos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/statik-jos/subscriptions","organizations_url":"https://api.github.com/users/statik-jos/orgs","repos_url":"https://api.github.com/users/statik-jos/repos","events_url":"https://api.github.com/users/statik-jos/events{/privacy}","received_events_url":"https://api.github.com/users/statik-jos/received_events","type":"User","site_admin":false},"body":"Sorry, I'm used to other code guidelines. I will fix it.","created_at":"2016-06-28T11:54:33Z","updated_at":"2016-06-28T11:54:33Z","html_url":"https://github.com/woothemes/woocommerce/pull/11269#discussion_r68742359","pull_request_url":"https://api.github.com/repos/woothemes/woocommerce/pulls/11269","_links":{"self":{"href":"https://api.github.com/repos/woothemes/woocommerce/pulls/comments/68742359"},"html":{"href":"https://github.com/woothemes/woocommerce/pull/11269#discussion_r68742359"},"pull_request":{"href":"https://api.github.com/repos/woothemes/woocommerce/pulls/11269"}}},"pull_request":{"url":"https://api.github.com/repos/woothemes/woocommerce/pulls/11269","id":75453868,"html_url":"https://github.com/woothemes/woocommerce/pull/11269","diff_url":"https://github.com/woothemes/woocommerce/pull/11269.diff","patch_url":"https://github.com/woothemes/woocommerce/pull/11269.patch","issue_url":"https://api.github.com/repos/woothemes/woocommerce/issues/11269","number":11269,"state":"open","locked":false,"title":"Issue #11062 fix to reduce race condition in WC_Session_Handler.","user":{"login":"statik-jos","id":15955699,"avatar_url":"https://avatars.githubusercontent.com/u/15955699?v=3","gravatar_id":"","url":"https://api.github.com/users/statik-jos","html_url":"https://github.com/statik-jos","followers_url":"https://api.github.com/users/statik-jos/followers","following_url":"https://api.github.com/users/statik-jos/following{/other_user}","gists_url":"https://api.github.com/users/statik-jos/gists{/gist_id}","starred_url":"https://api.github.com/users/statik-jos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/statik-jos/subscriptions","organizations_url":"https://api.github.com/users/statik-jos/orgs","repos_url":"https://api.github.com/users/statik-jos/repos","events_url":"https://api.github.com/users/statik-jos/events{/privacy}","received_events_url":"https://api.github.com/users/statik-jos/received_events","type":"User","site_admin":false},"body":"These few lines of code should help reduce the race condition present in the WC_Session_Handler.\r\n\r\nIt reduces the number of session saves to the database by comparing the serialized session data with the original data retrieved from the database.\r\nWhen they are the same, saving is bypassed.\r\n\r\nThis is what I would assume the WC_Session::$_dirty flag functionality is for, but it fails to deliver. In my use case the $_dirty flag always seems to be true at the end of the request, causing the session to be overwritten with possibly a stale version.\r\n\r\nThis occurs ~10% of the time when I add a product to my cart in our setup.","created_at":"2016-06-28T10:29:50Z","updated_at":"2016-06-28T11:54:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6fb40e431adec48b4fdcc89d79c197c1fc5524c9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/woothemes/woocommerce/pulls/11269/commits","review_comments_url":"https://api.github.com/repos/woothemes/woocommerce/pulls/11269/comments","review_comment_url":"https://api.github.com/repos/woothemes/woocommerce/pulls/comments{/number}","comments_url":"https://api.github.com/repos/woothemes/woocommerce/issues/11269/comments","statuses_url":"https://api.github.com/repos/woothemes/woocommerce/statuses/0aaf0a25c90877edce13153812e042a825f11af8","head":{"label":"statik-jos:issue/11062","ref":"issue/11062","sha":"0aaf0a25c90877edce13153812e042a825f11af8","user":{"login":"statik-jos","id":15955699,"avatar_url":"https://avatars.githubusercontent.com/u/15955699?v=3","gravatar_id":"","url":"https://api.github.com/users/statik-jos","html_url":"https://github.com/statik-jos","followers_url":"https://api.github.com/users/statik-jos/followers","following_url":"https://api.github.com/users/statik-jos/following{/other_user}","gists_url":"https://api.github.com/users/statik-jos/gists{/gist_id}","starred_url":"https://api.github.com/users/statik-jos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/statik-jos/subscriptions","organizations_url":"https://api.github.com/users/statik-jos/orgs","repos_url":"https://api.github.com/users/statik-jos/repos","events_url":"https://api.github.com/users/statik-jos/events{/privacy}","received_events_url":"https://api.github.com/users/statik-jos/received_events","type":"User","site_admin":false},"repo":{"id":62127000,"name":"woocommerce","full_name":"statik-jos/woocommerce","owner":{"login":"statik-jos","id":15955699,"avatar_url":"https://avatars.githubusercontent.com/u/15955699?v=3","gravatar_id":"","url":"https://api.github.com/users/statik-jos","html_url":"https://github.com/statik-jos","followers_url":"https://api.github.com/users/statik-jos/followers","following_url":"https://api.github.com/users/statik-jos/following{/other_user}","gists_url":"https://api.github.com/users/statik-jos/gists{/gist_id}","starred_url":"https://api.github.com/users/statik-jos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/statik-jos/subscriptions","organizations_url":"https://api.github.com/users/statik-jos/orgs","repos_url":"https://api.github.com/users/statik-jos/repos","events_url":"https://api.github.com/users/statik-jos/events{/privacy}","received_events_url":"https://api.github.com/users/statik-jos/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/statik-jos/woocommerce","description":"An open source eCommerce plugin for WordPress created by WooThemes.","fork":true,"url":"https://api.github.com/repos/statik-jos/woocommerce","forks_url":"https://api.github.com/repos/statik-jos/woocommerce/forks","keys_url":"https://api.github.com/repos/statik-jos/woocommerce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/statik-jos/woocommerce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/statik-jos/woocommerce/teams","hooks_url":"https://api.github.com/repos/statik-jos/woocommerce/hooks","issue_events_url":"https://api.github.com/repos/statik-jos/woocommerce/issues/events{/number}","events_url":"https://api.github.com/repos/statik-jos/woocommerce/events","assignees_url":"https://api.github.com/repos/statik-jos/woocommerce/assignees{/user}","branches_url":"https://api.github.com/repos/statik-jos/woocommerce/branches{/branch}","tags_url":"https://api.github.com/repos/statik-jos/woocommerce/tags","blobs_url":"https://api.github.com/repos/statik-jos/woocommerce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/statik-jos/woocommerce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/statik-jos/woocommerce/git/refs{/sha}","trees_url":"https://api.github.com/repos/statik-jos/woocommerce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/statik-jos/woocommerce/statuses/{sha}","languages_url":"https://api.github.com/repos/statik-jos/woocommerce/languages","stargazers_url":"https://api.github.com/repos/statik-jos/woocommerce/stargazers","contributors_url":"https://api.github.com/repos/statik-jos/woocommerce/contributors","subscribers_url":"https://api.github.com/repos/statik-jos/woocommerce/subscribers","subscription_url":"https://api.github.com/repos/statik-jos/woocommerce/subscription","commits_url":"https://api.github.com/repos/statik-jos/woocommerce/commits{/sha}","git_commits_url":"https://api.github.com/repos/statik-jos/woocommerce/git/commits{/sha}","comments_url":"https://api.github.com/repos/statik-jos/woocommerce/comments{/number}","issue_comment_url":"https://api.github.com/repos/statik-jos/woocommerce/issues/comments{/number}","contents_url":"https://api.github.com/repos/statik-jos/woocommerce/contents/{+path}","compare_url":"https://api.github.com/repos/statik-jos/woocommerce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/statik-jos/woocommerce/merges","archive_url":"https://api.github.com/repos/statik-jos/woocommerce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/statik-jos/woocommerce/downloads","issues_url":"https://api.github.com/repos/statik-jos/woocommerce/issues{/number}","pulls_url":"https://api.github.com/repos/statik-jos/woocommerce/pulls{/number}","milestones_url":"https://api.github.com/repos/statik-jos/woocommerce/milestones{/number}","notifications_url":"https://api.github.com/repos/statik-jos/woocommerce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/statik-jos/woocommerce/labels{/name}","releases_url":"https://api.github.com/repos/statik-jos/woocommerce/releases{/id}","deployments_url":"https://api.github.com/repos/statik-jos/woocommerce/deployments","created_at":"2016-06-28T09:12:54Z","updated_at":"2016-06-28T09:13:00Z","pushed_at":"2016-06-28T10:03:35Z","git_url":"git://github.com/statik-jos/woocommerce.git","ssh_url":"git@github.com:statik-jos/woocommerce.git","clone_url":"https://github.com/statik-jos/woocommerce.git","svn_url":"https://github.com/statik-jos/woocommerce","homepage":"http://www.woothemes.com/woocommerce/","size":115182,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"woothemes:master","ref":"master","sha":"53552f8028f89c59f3580727fa7efa9d2c6c8a1d","user":{"login":"woothemes","id":473596,"avatar_url":"https://avatars.githubusercontent.com/u/473596?v=3","gravatar_id":"","url":"https://api.github.com/users/woothemes","html_url":"https://github.com/woothemes","followers_url":"https://api.github.com/users/woothemes/followers","following_url":"https://api.github.com/users/woothemes/following{/other_user}","gists_url":"https://api.github.com/users/woothemes/gists{/gist_id}","starred_url":"https://api.github.com/users/woothemes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/woothemes/subscriptions","organizations_url":"https://api.github.com/users/woothemes/orgs","repos_url":"https://api.github.com/users/woothemes/repos","events_url":"https://api.github.com/users/woothemes/events{/privacy}","received_events_url":"https://api.github.com/users/woothemes/received_events","type":"Organization","site_admin":false},"repo":{"id":2179920,"name":"woocommerce","full_name":"woothemes/woocommerce","owner":{"login":"woothemes","id":473596,"avatar_url":"https://avatars.githubusercontent.com/u/473596?v=3","gravatar_id":"","url":"https://api.github.com/users/woothemes","html_url":"https://github.com/woothemes","followers_url":"https://api.github.com/users/woothemes/followers","following_url":"https://api.github.com/users/woothemes/following{/other_user}","gists_url":"https://api.github.com/users/woothemes/gists{/gist_id}","starred_url":"https://api.github.com/users/woothemes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/woothemes/subscriptions","organizations_url":"https://api.github.com/users/woothemes/orgs","repos_url":"https://api.github.com/users/woothemes/repos","events_url":"https://api.github.com/users/woothemes/events{/privacy}","received_events_url":"https://api.github.com/users/woothemes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/woothemes/woocommerce","description":"An open source eCommerce plugin for WordPress created by WooThemes.","fork":false,"url":"https://api.github.com/repos/woothemes/woocommerce","forks_url":"https://api.github.com/repos/woothemes/woocommerce/forks","keys_url":"https://api.github.com/repos/woothemes/woocommerce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/woothemes/woocommerce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/woothemes/woocommerce/teams","hooks_url":"https://api.github.com/repos/woothemes/woocommerce/hooks","issue_events_url":"https://api.github.com/repos/woothemes/woocommerce/issues/events{/number}","events_url":"https://api.github.com/repos/woothemes/woocommerce/events","assignees_url":"https://api.github.com/repos/woothemes/woocommerce/assignees{/user}","branches_url":"https://api.github.com/repos/woothemes/woocommerce/branches{/branch}","tags_url":"https://api.github.com/repos/woothemes/woocommerce/tags","blobs_url":"https://api.github.com/repos/woothemes/woocommerce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/woothemes/woocommerce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/woothemes/woocommerce/git/refs{/sha}","trees_url":"https://api.github.com/repos/woothemes/woocommerce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/woothemes/woocommerce/statuses/{sha}","languages_url":"https://api.github.com/repos/woothemes/woocommerce/languages","stargazers_url":"https://api.github.com/repos/woothemes/woocommerce/stargazers","contributors_url":"https://api.github.com/repos/woothemes/woocommerce/contributors","subscribers_url":"https://api.github.com/repos/woothemes/woocommerce/subscribers","subscription_url":"https://api.github.com/repos/woothemes/woocommerce/subscription","commits_url":"https://api.github.com/repos/woothemes/woocommerce/commits{/sha}","git_commits_url":"https://api.github.com/repos/woothemes/woocommerce/git/commits{/sha}","comments_url":"https://api.github.com/repos/woothemes/woocommerce/comments{/number}","issue_comment_url":"https://api.github.com/repos/woothemes/woocommerce/issues/comments{/number}","contents_url":"https://api.github.com/repos/woothemes/woocommerce/contents/{+path}","compare_url":"https://api.github.com/repos/woothemes/woocommerce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/woothemes/woocommerce/merges","archive_url":"https://api.github.com/repos/woothemes/woocommerce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/woothemes/woocommerce/downloads","issues_url":"https://api.github.com/repos/woothemes/woocommerce/issues{/number}","pulls_url":"https://api.github.com/repos/woothemes/woocommerce/pulls{/number}","milestones_url":"https://api.github.com/repos/woothemes/woocommerce/milestones{/number}","notifications_url":"https://api.github.com/repos/woothemes/woocommerce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/woothemes/woocommerce/labels{/name}","releases_url":"https://api.github.com/repos/woothemes/woocommerce/releases{/id}","deployments_url":"https://api.github.com/repos/woothemes/woocommerce/deployments","created_at":"2011-08-09T15:12:11Z","updated_at":"2016-06-28T01:59:39Z","pushed_at":"2016-06-28T10:57:37Z","git_url":"git://github.com/woothemes/woocommerce.git","ssh_url":"git@github.com:woothemes/woocommerce.git","clone_url":"https://github.com/woothemes/woocommerce.git","svn_url":"https://github.com/woothemes/woocommerce","homepage":"http://www.woothemes.com/woocommerce/","size":130712,"stargazers_count":2770,"watchers_count":2770,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2265,"mirror_url":null,"open_issues_count":51,"forks":2265,"open_issues":51,"watchers":2770,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/woothemes/woocommerce/pulls/11269"},"html":{"href":"https://github.com/woothemes/woocommerce/pull/11269"},"issue":{"href":"https://api.github.com/repos/woothemes/woocommerce/issues/11269"},"comments":{"href":"https://api.github.com/repos/woothemes/woocommerce/issues/11269/comments"},"review_comments":{"href":"https://api.github.com/repos/woothemes/woocommerce/pulls/11269/comments"},"review_comment":{"href":"https://api.github.com/repos/woothemes/woocommerce/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/woothemes/woocommerce/pulls/11269/commits"},"statuses":{"href":"https://api.github.com/repos/woothemes/woocommerce/statuses/0aaf0a25c90877edce13153812e042a825f11af8"}}}}
{"actor":{"display_login":"statik-jos"}}