{"action":"created","comment":{"url":"https://api.github.com/repos/maidsafe/safe_vault/pulls/comments/127736187","pull_request_review_id":50350374,"id":127736187,"diff_hunk":"@@ -392,8 +392,16 @@ impl DataManager {\n                             -> Result<(), InternalError> {\n         let data_id = data.id();\n \n-        let res = if self.chunk_store.has(&data_id) {\n-            Err(ClientError::DataExists)\n+        let res = if let Ok(old_data) = self.chunk_store.get(&data_id) {\n+            if old_data == data {\n+                // Putting the same data more than once is allowed to support idempotence.\n+                routing_node\n+                    .send_put_mdata_response(dst, src, Ok(()), msg_id)?;\n+                return Ok(());\n+            } else {\n+                // But putting different data with the same id is not.","path":"src/personas/data_manager/mod.rs","position":13,"original_position":13,"commit_id":"afc44949a3000bcf4d0cf8b0a6d63c4784f65b6b","original_commit_id":"afc44949a3000bcf4d0cf8b0a6d63c4784f65b6b","user":{"login":"maqi","id":568777,"avatar_url":"https://avatars6.githubusercontent.com/u/568777?v=4","gravatar_id":"","url":"https://api.github.com/users/maqi","html_url":"https://github.com/maqi","followers_url":"https://api.github.com/users/maqi/followers","following_url":"https://api.github.com/users/maqi/following{/other_user}","gists_url":"https://api.github.com/users/maqi/gists{/gist_id}","starred_url":"https://api.github.com/users/maqi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maqi/subscriptions","organizations_url":"https://api.github.com/users/maqi/orgs","repos_url":"https://api.github.com/users/maqi/repos","events_url":"https://api.github.com/users/maqi/events{/privacy}","received_events_url":"https://api.github.com/users/maqi/received_events","type":"User","site_admin":false},"body":"what if the client sends seq of request with: put(v_0), update(v_1), put(v_0)  ?","created_at":"2017-07-17T15:13:36Z","updated_at":"2017-07-17T15:23:04Z","html_url":"https://github.com/maidsafe/safe_vault/pull/635#discussion_r127736187","pull_request_url":"https://api.github.com/repos/maidsafe/safe_vault/pulls/635","_links":{"self":{"href":"https://api.github.com/repos/maidsafe/safe_vault/pulls/comments/127736187"},"html":{"href":"https://github.com/maidsafe/safe_vault/pull/635#discussion_r127736187"},"pull_request":{"href":"https://api.github.com/repos/maidsafe/safe_vault/pulls/635"}}},"pull_request":{"url":"https://api.github.com/repos/maidsafe/safe_vault/pulls/635","id":130591862,"html_url":"https://github.com/maidsafe/safe_vault/pull/635","diff_url":"https://github.com/maidsafe/safe_vault/pull/635.diff","patch_url":"https://github.com/maidsafe/safe_vault/pull/635.patch","issue_url":"https://api.github.com/repos/maidsafe/safe_vault/issues/635","number":635,"state":"open","locked":false,"title":"(WIP) feat/data-manager: add support for idempotent operations","user":{"login":"madadam","id":5271,"avatar_url":"https://avatars4.githubusercontent.com/u/5271?v=4","gravatar_id":"","url":"https://api.github.com/users/madadam","html_url":"https://github.com/madadam","followers_url":"https://api.github.com/users/madadam/followers","following_url":"https://api.github.com/users/madadam/following{/other_user}","gists_url":"https://api.github.com/users/madadam/gists{/gist_id}","starred_url":"https://api.github.com/users/madadam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madadam/subscriptions","organizations_url":"https://api.github.com/users/madadam/orgs","repos_url":"https://api.github.com/users/madadam/repos","events_url":"https://api.github.com/users/madadam/events{/privacy}","received_events_url":"https://api.github.com/users/madadam/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-07-14T13:41:22Z","updated_at":"2017-07-17T15:23:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"49bfa00e3d7b267442e9941ecff0b910bbea003a","assignee":{"login":"Fraser999","id":190532,"avatar_url":"https://avatars7.githubusercontent.com/u/190532?v=4","gravatar_id":"","url":"https://api.github.com/users/Fraser999","html_url":"https://github.com/Fraser999","followers_url":"https://api.github.com/users/Fraser999/followers","following_url":"https://api.github.com/users/Fraser999/following{/other_user}","gists_url":"https://api.github.com/users/Fraser999/gists{/gist_id}","starred_url":"https://api.github.com/users/Fraser999/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fraser999/subscriptions","organizations_url":"https://api.github.com/users/Fraser999/orgs","repos_url":"https://api.github.com/users/Fraser999/repos","events_url":"https://api.github.com/users/Fraser999/events{/privacy}","received_events_url":"https://api.github.com/users/Fraser999/received_events","type":"User","site_admin":false},"assignees":[{"login":"Fraser999","id":190532,"avatar_url":"https://avatars7.githubusercontent.com/u/190532?v=4","gravatar_id":"","url":"https://api.github.com/users/Fraser999","html_url":"https://github.com/Fraser999","followers_url":"https://api.github.com/users/Fraser999/followers","following_url":"https://api.github.com/users/Fraser999/following{/other_user}","gists_url":"https://api.github.com/users/Fraser999/gists{/gist_id}","starred_url":"https://api.github.com/users/Fraser999/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fraser999/subscriptions","organizations_url":"https://api.github.com/users/Fraser999/orgs","repos_url":"https://api.github.com/users/Fraser999/repos","events_url":"https://api.github.com/users/Fraser999/events{/privacy}","received_events_url":"https://api.github.com/users/Fraser999/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/maidsafe/safe_vault/pulls/635/commits","review_comments_url":"https://api.github.com/repos/maidsafe/safe_vault/pulls/635/comments","review_comment_url":"https://api.github.com/repos/maidsafe/safe_vault/pulls/comments{/number}","comments_url":"https://api.github.com/repos/maidsafe/safe_vault/issues/635/comments","statuses_url":"https://api.github.com/repos/maidsafe/safe_vault/statuses/afc44949a3000bcf4d0cf8b0a6d63c4784f65b6b","head":{"label":"madadam:idempotent-operations","ref":"idempotent-operations","sha":"afc44949a3000bcf4d0cf8b0a6d63c4784f65b6b","user":{"login":"madadam","id":5271,"avatar_url":"https://avatars4.githubusercontent.com/u/5271?v=4","gravatar_id":"","url":"https://api.github.com/users/madadam","html_url":"https://github.com/madadam","followers_url":"https://api.github.com/users/madadam/followers","following_url":"https://api.github.com/users/madadam/following{/other_user}","gists_url":"https://api.github.com/users/madadam/gists{/gist_id}","starred_url":"https://api.github.com/users/madadam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madadam/subscriptions","organizations_url":"https://api.github.com/users/madadam/orgs","repos_url":"https://api.github.com/users/madadam/repos","events_url":"https://api.github.com/users/madadam/events{/privacy}","received_events_url":"https://api.github.com/users/madadam/received_events","type":"User","site_admin":false},"repo":{"id":49430217,"name":"safe_vault","full_name":"madadam/safe_vault","owner":{"login":"madadam","id":5271,"avatar_url":"https://avatars4.githubusercontent.com/u/5271?v=4","gravatar_id":"","url":"https://api.github.com/users/madadam","html_url":"https://github.com/madadam","followers_url":"https://api.github.com/users/madadam/followers","following_url":"https://api.github.com/users/madadam/following{/other_user}","gists_url":"https://api.github.com/users/madadam/gists{/gist_id}","starred_url":"https://api.github.com/users/madadam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madadam/subscriptions","organizations_url":"https://api.github.com/users/madadam/orgs","repos_url":"https://api.github.com/users/madadam/repos","events_url":"https://api.github.com/users/madadam/events{/privacy}","received_events_url":"https://api.github.com/users/madadam/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/madadam/safe_vault","description":"An Implementation of a SAFE Network Vault","fork":true,"url":"https://api.github.com/repos/madadam/safe_vault","forks_url":"https://api.github.com/repos/madadam/safe_vault/forks","keys_url":"https://api.github.com/repos/madadam/safe_vault/keys{/key_id}","collaborators_url":"https://api.github.com/repos/madadam/safe_vault/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/madadam/safe_vault/teams","hooks_url":"https://api.github.com/repos/madadam/safe_vault/hooks","issue_events_url":"https://api.github.com/repos/madadam/safe_vault/issues/events{/number}","events_url":"https://api.github.com/repos/madadam/safe_vault/events","assignees_url":"https://api.github.com/repos/madadam/safe_vault/assignees{/user}","branches_url":"https://api.github.com/repos/madadam/safe_vault/branches{/branch}","tags_url":"https://api.github.com/repos/madadam/safe_vault/tags","blobs_url":"https://api.github.com/repos/madadam/safe_vault/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/madadam/safe_vault/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/madadam/safe_vault/git/refs{/sha}","trees_url":"https://api.github.com/repos/madadam/safe_vault/git/trees{/sha}","statuses_url":"https://api.github.com/repos/madadam/safe_vault/statuses/{sha}","languages_url":"https://api.github.com/repos/madadam/safe_vault/languages","stargazers_url":"https://api.github.com/repos/madadam/safe_vault/stargazers","contributors_url":"https://api.github.com/repos/madadam/safe_vault/contributors","subscribers_url":"https://api.github.com/repos/madadam/safe_vault/subscribers","subscription_url":"https://api.github.com/repos/madadam/safe_vault/subscription","commits_url":"https://api.github.com/repos/madadam/safe_vault/commits{/sha}","git_commits_url":"https://api.github.com/repos/madadam/safe_vault/git/commits{/sha}","comments_url":"https://api.github.com/repos/madadam/safe_vault/comments{/number}","issue_comment_url":"https://api.github.com/repos/madadam/safe_vault/issues/comments{/number}","contents_url":"https://api.github.com/repos/madadam/safe_vault/contents/{+path}","compare_url":"https://api.github.com/repos/madadam/safe_vault/compare/{base}...{head}","merges_url":"https://api.github.com/repos/madadam/safe_vault/merges","archive_url":"https://api.github.com/repos/madadam/safe_vault/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/madadam/safe_vault/downloads","issues_url":"https://api.github.com/repos/madadam/safe_vault/issues{/number}","pulls_url":"https://api.github.com/repos/madadam/safe_vault/pulls{/number}","milestones_url":"https://api.github.com/repos/madadam/safe_vault/milestones{/number}","notifications_url":"https://api.github.com/repos/madadam/safe_vault/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/madadam/safe_vault/labels{/name}","releases_url":"https://api.github.com/repos/madadam/safe_vault/releases{/id}","deployments_url":"https://api.github.com/repos/madadam/safe_vault/deployments","created_at":"2016-01-11T14:06:38Z","updated_at":"2016-01-11T14:06:39Z","pushed_at":"2017-07-14T13:39:27Z","git_url":"git://github.com/madadam/safe_vault.git","ssh_url":"git@github.com:madadam/safe_vault.git","clone_url":"https://github.com/madadam/safe_vault.git","svn_url":"https://github.com/madadam/safe_vault","homepage":"","size":33460,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"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":"maidsafe:master","ref":"master","sha":"1f341ae70e78ff9ccd49d60ca8c2ce43f3c23e0d","user":{"login":"maidsafe","id":536423,"avatar_url":"https://avatars5.githubusercontent.com/u/536423?v=4","gravatar_id":"","url":"https://api.github.com/users/maidsafe","html_url":"https://github.com/maidsafe","followers_url":"https://api.github.com/users/maidsafe/followers","following_url":"https://api.github.com/users/maidsafe/following{/other_user}","gists_url":"https://api.github.com/users/maidsafe/gists{/gist_id}","starred_url":"https://api.github.com/users/maidsafe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maidsafe/subscriptions","organizations_url":"https://api.github.com/users/maidsafe/orgs","repos_url":"https://api.github.com/users/maidsafe/repos","events_url":"https://api.github.com/users/maidsafe/events{/privacy}","received_events_url":"https://api.github.com/users/maidsafe/received_events","type":"Organization","site_admin":false},"repo":{"id":32022044,"name":"safe_vault","full_name":"maidsafe/safe_vault","owner":{"login":"maidsafe","id":536423,"avatar_url":"https://avatars5.githubusercontent.com/u/536423?v=4","gravatar_id":"","url":"https://api.github.com/users/maidsafe","html_url":"https://github.com/maidsafe","followers_url":"https://api.github.com/users/maidsafe/followers","following_url":"https://api.github.com/users/maidsafe/following{/other_user}","gists_url":"https://api.github.com/users/maidsafe/gists{/gist_id}","starred_url":"https://api.github.com/users/maidsafe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maidsafe/subscriptions","organizations_url":"https://api.github.com/users/maidsafe/orgs","repos_url":"https://api.github.com/users/maidsafe/repos","events_url":"https://api.github.com/users/maidsafe/events{/privacy}","received_events_url":"https://api.github.com/users/maidsafe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/maidsafe/safe_vault","description":"An Implementation of a SAFE Network Vault","fork":false,"url":"https://api.github.com/repos/maidsafe/safe_vault","forks_url":"https://api.github.com/repos/maidsafe/safe_vault/forks","keys_url":"https://api.github.com/repos/maidsafe/safe_vault/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maidsafe/safe_vault/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maidsafe/safe_vault/teams","hooks_url":"https://api.github.com/repos/maidsafe/safe_vault/hooks","issue_events_url":"https://api.github.com/repos/maidsafe/safe_vault/issues/events{/number}","events_url":"https://api.github.com/repos/maidsafe/safe_vault/events","assignees_url":"https://api.github.com/repos/maidsafe/safe_vault/assignees{/user}","branches_url":"https://api.github.com/repos/maidsafe/safe_vault/branches{/branch}","tags_url":"https://api.github.com/repos/maidsafe/safe_vault/tags","blobs_url":"https://api.github.com/repos/maidsafe/safe_vault/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maidsafe/safe_vault/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maidsafe/safe_vault/git/refs{/sha}","trees_url":"https://api.github.com/repos/maidsafe/safe_vault/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maidsafe/safe_vault/statuses/{sha}","languages_url":"https://api.github.com/repos/maidsafe/safe_vault/languages","stargazers_url":"https://api.github.com/repos/maidsafe/safe_vault/stargazers","contributors_url":"https://api.github.com/repos/maidsafe/safe_vault/contributors","subscribers_url":"https://api.github.com/repos/maidsafe/safe_vault/subscribers","subscription_url":"https://api.github.com/repos/maidsafe/safe_vault/subscription","commits_url":"https://api.github.com/repos/maidsafe/safe_vault/commits{/sha}","git_commits_url":"https://api.github.com/repos/maidsafe/safe_vault/git/commits{/sha}","comments_url":"https://api.github.com/repos/maidsafe/safe_vault/comments{/number}","issue_comment_url":"https://api.github.com/repos/maidsafe/safe_vault/issues/comments{/number}","contents_url":"https://api.github.com/repos/maidsafe/safe_vault/contents/{+path}","compare_url":"https://api.github.com/repos/maidsafe/safe_vault/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maidsafe/safe_vault/merges","archive_url":"https://api.github.com/repos/maidsafe/safe_vault/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maidsafe/safe_vault/downloads","issues_url":"https://api.github.com/repos/maidsafe/safe_vault/issues{/number}","pulls_url":"https://api.github.com/repos/maidsafe/safe_vault/pulls{/number}","milestones_url":"https://api.github.com/repos/maidsafe/safe_vault/milestones{/number}","notifications_url":"https://api.github.com/repos/maidsafe/safe_vault/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maidsafe/safe_vault/labels{/name}","releases_url":"https://api.github.com/repos/maidsafe/safe_vault/releases{/id}","deployments_url":"https://api.github.com/repos/maidsafe/safe_vault/deployments","created_at":"2015-03-11T14:27:31Z","updated_at":"2017-07-14T21:48:03Z","pushed_at":"2017-07-17T10:56:51Z","git_url":"git://github.com/maidsafe/safe_vault.git","ssh_url":"git@github.com:maidsafe/safe_vault.git","clone_url":"https://github.com/maidsafe/safe_vault.git","svn_url":"https://github.com/maidsafe/safe_vault","homepage":"","size":75055,"stargazers_count":90,"watchers_count":90,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":38,"mirror_url":null,"open_issues_count":23,"forks":38,"open_issues":23,"watchers":90,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/maidsafe/safe_vault/pulls/635"},"html":{"href":"https://github.com/maidsafe/safe_vault/pull/635"},"issue":{"href":"https://api.github.com/repos/maidsafe/safe_vault/issues/635"},"comments":{"href":"https://api.github.com/repos/maidsafe/safe_vault/issues/635/comments"},"review_comments":{"href":"https://api.github.com/repos/maidsafe/safe_vault/pulls/635/comments"},"review_comment":{"href":"https://api.github.com/repos/maidsafe/safe_vault/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/maidsafe/safe_vault/pulls/635/commits"},"statuses":{"href":"https://api.github.com/repos/maidsafe/safe_vault/statuses/afc44949a3000bcf4d0cf8b0a6d63c4784f65b6b"}}}}
{"actor":{"display_login":"maqi"}}