{"action":"closed","number":14,"pull_request":{"url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/pulls/14","id":86517474,"html_url":"https://github.com/tekmaven/NServiceBus.Persistence.MongoDb/pull/14","diff_url":"https://github.com/tekmaven/NServiceBus.Persistence.MongoDb/pull/14.diff","patch_url":"https://github.com/tekmaven/NServiceBus.Persistence.MongoDb/pull/14.patch","issue_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/issues/14","number":14,"state":"closed","locked":false,"title":"Fix duplications on deferred messages","user":{"login":"mattwhetton","id":3754954,"avatar_url":"https://avatars.githubusercontent.com/u/3754954?v=3","gravatar_id":"","url":"https://api.github.com/users/mattwhetton","html_url":"https://github.com/mattwhetton","followers_url":"https://api.github.com/users/mattwhetton/followers","following_url":"https://api.github.com/users/mattwhetton/following{/other_user}","gists_url":"https://api.github.com/users/mattwhetton/gists{/gist_id}","starred_url":"https://api.github.com/users/mattwhetton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattwhetton/subscriptions","organizations_url":"https://api.github.com/users/mattwhetton/orgs","repos_url":"https://api.github.com/users/mattwhetton/repos","events_url":"https://api.github.com/users/mattwhetton/events{/privacy}","received_events_url":"https://api.github.com/users/mattwhetton/received_events","type":"User","site_admin":false},"body":"When using multiple nodes it is possible to get duplicate messages based on timeouts (when using defers and potentially sagas). \r\n\r\nThis is caused in a race condition as NServiceBus expects the peek to be involved in a update locking transaction (looking at the NHibernate persistence provider).\r\n\r\nGiven that MongoDB doesn't support transactions I've resolved this by adding a short lock in the Peek method. The lock expires after 10 seconds, and should ensure that multiple nodes cannot pick up the same timeout and dispatch it for handling.","created_at":"2016-09-23T13:58:13Z","updated_at":"2016-09-23T18:37:01Z","closed_at":"2016-09-23T18:37:01Z","merged_at":"2016-09-23T18:37:01Z","merge_commit_sha":"2a872847290890bc6af8af8baae45f2b58296dea","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/pulls/14/commits","review_comments_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/pulls/14/comments","review_comment_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/issues/14/comments","statuses_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/statuses/2a872847290890bc6af8af8baae45f2b58296dea","head":{"label":"mattwhetton:master","ref":"master","sha":"2a872847290890bc6af8af8baae45f2b58296dea","user":{"login":"mattwhetton","id":3754954,"avatar_url":"https://avatars.githubusercontent.com/u/3754954?v=3","gravatar_id":"","url":"https://api.github.com/users/mattwhetton","html_url":"https://github.com/mattwhetton","followers_url":"https://api.github.com/users/mattwhetton/followers","following_url":"https://api.github.com/users/mattwhetton/following{/other_user}","gists_url":"https://api.github.com/users/mattwhetton/gists{/gist_id}","starred_url":"https://api.github.com/users/mattwhetton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattwhetton/subscriptions","organizations_url":"https://api.github.com/users/mattwhetton/orgs","repos_url":"https://api.github.com/users/mattwhetton/repos","events_url":"https://api.github.com/users/mattwhetton/events{/privacy}","received_events_url":"https://api.github.com/users/mattwhetton/received_events","type":"User","site_admin":false},"repo":{"id":69028787,"name":"NServiceBus.Persistence.MongoDb","full_name":"mattwhetton/NServiceBus.Persistence.MongoDb","owner":{"login":"mattwhetton","id":3754954,"avatar_url":"https://avatars.githubusercontent.com/u/3754954?v=3","gravatar_id":"","url":"https://api.github.com/users/mattwhetton","html_url":"https://github.com/mattwhetton","followers_url":"https://api.github.com/users/mattwhetton/followers","following_url":"https://api.github.com/users/mattwhetton/following{/other_user}","gists_url":"https://api.github.com/users/mattwhetton/gists{/gist_id}","starred_url":"https://api.github.com/users/mattwhetton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattwhetton/subscriptions","organizations_url":"https://api.github.com/users/mattwhetton/orgs","repos_url":"https://api.github.com/users/mattwhetton/repos","events_url":"https://api.github.com/users/mattwhetton/events{/privacy}","received_events_url":"https://api.github.com/users/mattwhetton/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mattwhetton/NServiceBus.Persistence.MongoDb","description":"MongoDB Persistence for NServiceBus v5+","fork":true,"url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb","forks_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/forks","keys_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/teams","hooks_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/hooks","issue_events_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/issues/events{/number}","events_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/events","assignees_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/assignees{/user}","branches_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/branches{/branch}","tags_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/tags","blobs_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/git/refs{/sha}","trees_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/statuses/{sha}","languages_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/languages","stargazers_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/stargazers","contributors_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/contributors","subscribers_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/subscribers","subscription_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/subscription","commits_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/commits{/sha}","git_commits_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/git/commits{/sha}","comments_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/comments{/number}","issue_comment_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/issues/comments{/number}","contents_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/contents/{+path}","compare_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/merges","archive_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/downloads","issues_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/issues{/number}","pulls_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/pulls{/number}","milestones_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/milestones{/number}","notifications_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/labels{/name}","releases_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/releases{/id}","deployments_url":"https://api.github.com/repos/mattwhetton/NServiceBus.Persistence.MongoDb/deployments","created_at":"2016-09-23T13:45:20Z","updated_at":"2016-09-23T13:45:21Z","pushed_at":"2016-09-23T13:50:47Z","git_url":"git://github.com/mattwhetton/NServiceBus.Persistence.MongoDb.git","ssh_url":"git@github.com:mattwhetton/NServiceBus.Persistence.MongoDb.git","clone_url":"https://github.com/mattwhetton/NServiceBus.Persistence.MongoDb.git","svn_url":"https://github.com/mattwhetton/NServiceBus.Persistence.MongoDb","homepage":"","size":856,"stargazers_count":0,"watchers_count":0,"language":"C#","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":"tekmaven:master","ref":"master","sha":"488ee7e5cb6afc88ed72b07f675cba02508d1a0c","user":{"login":"tekmaven","id":349445,"avatar_url":"https://avatars.githubusercontent.com/u/349445?v=3","gravatar_id":"","url":"https://api.github.com/users/tekmaven","html_url":"https://github.com/tekmaven","followers_url":"https://api.github.com/users/tekmaven/followers","following_url":"https://api.github.com/users/tekmaven/following{/other_user}","gists_url":"https://api.github.com/users/tekmaven/gists{/gist_id}","starred_url":"https://api.github.com/users/tekmaven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tekmaven/subscriptions","organizations_url":"https://api.github.com/users/tekmaven/orgs","repos_url":"https://api.github.com/users/tekmaven/repos","events_url":"https://api.github.com/users/tekmaven/events{/privacy}","received_events_url":"https://api.github.com/users/tekmaven/received_events","type":"User","site_admin":false},"repo":{"id":17790584,"name":"NServiceBus.Persistence.MongoDb","full_name":"tekmaven/NServiceBus.Persistence.MongoDb","owner":{"login":"tekmaven","id":349445,"avatar_url":"https://avatars.githubusercontent.com/u/349445?v=3","gravatar_id":"","url":"https://api.github.com/users/tekmaven","html_url":"https://github.com/tekmaven","followers_url":"https://api.github.com/users/tekmaven/followers","following_url":"https://api.github.com/users/tekmaven/following{/other_user}","gists_url":"https://api.github.com/users/tekmaven/gists{/gist_id}","starred_url":"https://api.github.com/users/tekmaven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tekmaven/subscriptions","organizations_url":"https://api.github.com/users/tekmaven/orgs","repos_url":"https://api.github.com/users/tekmaven/repos","events_url":"https://api.github.com/users/tekmaven/events{/privacy}","received_events_url":"https://api.github.com/users/tekmaven/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tekmaven/NServiceBus.Persistence.MongoDb","description":"MongoDB Persistence for NServiceBus v5+","fork":false,"url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb","forks_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/forks","keys_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/teams","hooks_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/hooks","issue_events_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/issues/events{/number}","events_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/events","assignees_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/assignees{/user}","branches_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/branches{/branch}","tags_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/tags","blobs_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/git/refs{/sha}","trees_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/statuses/{sha}","languages_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/languages","stargazers_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/stargazers","contributors_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/contributors","subscribers_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/subscribers","subscription_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/subscription","commits_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/commits{/sha}","git_commits_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/git/commits{/sha}","comments_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/comments{/number}","issue_comment_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/issues/comments{/number}","contents_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/contents/{+path}","compare_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/merges","archive_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/downloads","issues_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/issues{/number}","pulls_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/pulls{/number}","milestones_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/milestones{/number}","notifications_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/labels{/name}","releases_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/releases{/id}","deployments_url":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/deployments","created_at":"2014-03-16T02:40:00Z","updated_at":"2016-08-15T14:12:56Z","pushed_at":"2016-09-23T18:37:01Z","git_url":"git://github.com/tekmaven/NServiceBus.Persistence.MongoDb.git","ssh_url":"git@github.com:tekmaven/NServiceBus.Persistence.MongoDb.git","clone_url":"https://github.com/tekmaven/NServiceBus.Persistence.MongoDb.git","svn_url":"https://github.com/tekmaven/NServiceBus.Persistence.MongoDb","homepage":"","size":877,"stargazers_count":7,"watchers_count":7,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":2,"forks":8,"open_issues":2,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/pulls/14"},"html":{"href":"https://github.com/tekmaven/NServiceBus.Persistence.MongoDb/pull/14"},"issue":{"href":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/issues/14"},"comments":{"href":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/tekmaven/NServiceBus.Persistence.MongoDb/statuses/2a872847290890bc6af8af8baae45f2b58296dea"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"tekmaven","id":349445,"avatar_url":"https://avatars.githubusercontent.com/u/349445?v=3","gravatar_id":"","url":"https://api.github.com/users/tekmaven","html_url":"https://github.com/tekmaven","followers_url":"https://api.github.com/users/tekmaven/followers","following_url":"https://api.github.com/users/tekmaven/following{/other_user}","gists_url":"https://api.github.com/users/tekmaven/gists{/gist_id}","starred_url":"https://api.github.com/users/tekmaven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tekmaven/subscriptions","organizations_url":"https://api.github.com/users/tekmaven/orgs","repos_url":"https://api.github.com/users/tekmaven/repos","events_url":"https://api.github.com/users/tekmaven/events{/privacy}","received_events_url":"https://api.github.com/users/tekmaven/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":1,"additions":11,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"tekmaven"}}