{"action":"created","comment":{"url":"https://api.github.com/repos/rackerlabs/deuce/pulls/comments/23534528","id":23534528,"diff_hunk":"@@ -93,6 +93,8 @@ def put_async_block(self, block_ids, blockdatas):\n             block_ids,\n             blockdatas)\n \n+        retblocks = []","path":"deuce/model/vault.py","position":4,"original_position":4,"commit_id":"46e57d2bef4c9892e46bd8f7a1b47580eb9e0c35","original_commit_id":"46e57d2bef4c9892e46bd8f7a1b47580eb9e0c35","user":{"login":"BenjamenMeyer","id":1074110,"avatar_url":"https://avatars.githubusercontent.com/u/1074110?v=3","gravatar_id":"","url":"https://api.github.com/users/BenjamenMeyer","html_url":"https://github.com/BenjamenMeyer","followers_url":"https://api.github.com/users/BenjamenMeyer/followers","following_url":"https://api.github.com/users/BenjamenMeyer/following{/other_user}","gists_url":"https://api.github.com/users/BenjamenMeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/BenjamenMeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenjamenMeyer/subscriptions","organizations_url":"https://api.github.com/users/BenjamenMeyer/orgs","repos_url":"https://api.github.com/users/BenjamenMeyer/repos","events_url":"https://api.github.com/users/BenjamenMeyer/events{/privacy}","received_events_url":"https://api.github.com/users/BenjamenMeyer/received_events","type":"User","site_admin":false},"body":"It wouldn't make a difference, and could actually slow down the put_async_block() call.\r\n\r\n- The list is only built on success, so on failure it is ignored\r\n- To support the mapping parameter we would have to add a branch which would either:\r\n  - be a single branch evaluated just once, but then the entire ``for`` (L108-L123) would be duplicated\r\n  - be a single branch evaluated with each iteration of the loop, no code duplication but now a branch has to get evaluated often.\r\n\r\nNow, if this as C/C++ code we could use compiler markers to denote that the second case would not happen often so that the compiler could optimize accordingly; however, python gives us no such support. Perhaps Python has some really nice loop optimization logic built-in? I doubt it.\r\n\r\nThat said, if either of those is acceptable to the team, then I'll update it.","created_at":"2015-01-26T14:49:22Z","updated_at":"2015-01-26T14:49:22Z","html_url":"https://github.com/rackerlabs/deuce/pull/259#discussion_r23534528","pull_request_url":"https://api.github.com/repos/rackerlabs/deuce/pulls/259","_links":{"self":{"href":"https://api.github.com/repos/rackerlabs/deuce/pulls/comments/23534528"},"html":{"href":"https://github.com/rackerlabs/deuce/pull/259#discussion_r23534528"},"pull_request":{"href":"https://api.github.com/repos/rackerlabs/deuce/pulls/259"}}},"pull_request":{"url":"https://api.github.com/repos/rackerlabs/deuce/pulls/259","id":27850058,"html_url":"https://github.com/rackerlabs/deuce/pull/259","diff_url":"https://github.com/rackerlabs/deuce/pull/259.diff","patch_url":"https://github.com/rackerlabs/deuce/pull/259.patch","issue_url":"https://api.github.com/repos/rackerlabs/deuce/issues/259","number":259,"state":"open","locked":false,"title":"Enhancement msgpack returns","user":{"login":"BenjamenMeyer","id":1074110,"avatar_url":"https://avatars.githubusercontent.com/u/1074110?v=3","gravatar_id":"","url":"https://api.github.com/users/BenjamenMeyer","html_url":"https://github.com/BenjamenMeyer","followers_url":"https://api.github.com/users/BenjamenMeyer/followers","following_url":"https://api.github.com/users/BenjamenMeyer/following{/other_user}","gists_url":"https://api.github.com/users/BenjamenMeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/BenjamenMeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenjamenMeyer/subscriptions","organizations_url":"https://api.github.com/users/BenjamenMeyer/orgs","repos_url":"https://api.github.com/users/BenjamenMeyer/repos","events_url":"https://api.github.com/users/BenjamenMeyer/events{/privacy}","received_events_url":"https://api.github.com/users/BenjamenMeyer/received_events","type":"User","site_admin":false},"body":"Provide the ability for the msgpack upload to return the mapping of block id to storage id\r\n\r\nBy default (normal, optimal case), the msgpack upload returns a 201 on success and no message body.\r\n\r\nIf the caller adds the query string parameter \"mapping\" and a value of \"True\" then it will return a 200 response with a JSON message body mapping the block id to the storage id. The parameter is only utilized if it is provided and can be explicitly interpreted as a boolean value, and only triggers this response if it evaluates to True.\r\n\r\nUpdate the API test to verify this behavior by using a tuple set in the msgpack upload test. The first entry in the tuple decides of the async method is used; while the second decides if the query string parameter is present.\r\n\r\nNote: Corrects bug in API tests readme that specified the wrong location.\r\nNote: Adds a Bash script to make it easy for anyone to run the API tests. Once OpenCAFE supports Python 3 then we can use Bash Job Control to start/stop the Deuce Server too.","created_at":"2015-01-22T15:21:47Z","updated_at":"2015-01-26T14:49:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"74a87f6e13b80d9d88d41fde341c910b1038e57c","assignee":{"login":"BenjamenMeyer","id":1074110,"avatar_url":"https://avatars.githubusercontent.com/u/1074110?v=3","gravatar_id":"","url":"https://api.github.com/users/BenjamenMeyer","html_url":"https://github.com/BenjamenMeyer","followers_url":"https://api.github.com/users/BenjamenMeyer/followers","following_url":"https://api.github.com/users/BenjamenMeyer/following{/other_user}","gists_url":"https://api.github.com/users/BenjamenMeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/BenjamenMeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenjamenMeyer/subscriptions","organizations_url":"https://api.github.com/users/BenjamenMeyer/orgs","repos_url":"https://api.github.com/users/BenjamenMeyer/repos","events_url":"https://api.github.com/users/BenjamenMeyer/events{/privacy}","received_events_url":"https://api.github.com/users/BenjamenMeyer/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/rackerlabs/deuce/pulls/259/commits","review_comments_url":"https://api.github.com/repos/rackerlabs/deuce/pulls/259/comments","review_comment_url":"https://api.github.com/repos/rackerlabs/deuce/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rackerlabs/deuce/issues/259/comments","statuses_url":"https://api.github.com/repos/rackerlabs/deuce/statuses/46e57d2bef4c9892e46bd8f7a1b47580eb9e0c35","head":{"label":"BenjamenMeyer:enhancement_msgpack_returns","ref":"enhancement_msgpack_returns","sha":"46e57d2bef4c9892e46bd8f7a1b47580eb9e0c35","user":{"login":"BenjamenMeyer","id":1074110,"avatar_url":"https://avatars.githubusercontent.com/u/1074110?v=3","gravatar_id":"","url":"https://api.github.com/users/BenjamenMeyer","html_url":"https://github.com/BenjamenMeyer","followers_url":"https://api.github.com/users/BenjamenMeyer/followers","following_url":"https://api.github.com/users/BenjamenMeyer/following{/other_user}","gists_url":"https://api.github.com/users/BenjamenMeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/BenjamenMeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenjamenMeyer/subscriptions","organizations_url":"https://api.github.com/users/BenjamenMeyer/orgs","repos_url":"https://api.github.com/users/BenjamenMeyer/repos","events_url":"https://api.github.com/users/BenjamenMeyer/events{/privacy}","received_events_url":"https://api.github.com/users/BenjamenMeyer/received_events","type":"User","site_admin":false},"repo":{"id":20780300,"name":"deuce","full_name":"BenjamenMeyer/deuce","owner":{"login":"BenjamenMeyer","id":1074110,"avatar_url":"https://avatars.githubusercontent.com/u/1074110?v=3","gravatar_id":"","url":"https://api.github.com/users/BenjamenMeyer","html_url":"https://github.com/BenjamenMeyer","followers_url":"https://api.github.com/users/BenjamenMeyer/followers","following_url":"https://api.github.com/users/BenjamenMeyer/following{/other_user}","gists_url":"https://api.github.com/users/BenjamenMeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/BenjamenMeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenjamenMeyer/subscriptions","organizations_url":"https://api.github.com/users/BenjamenMeyer/orgs","repos_url":"https://api.github.com/users/BenjamenMeyer/repos","events_url":"https://api.github.com/users/BenjamenMeyer/events{/privacy}","received_events_url":"https://api.github.com/users/BenjamenMeyer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BenjamenMeyer/deuce","description":"Block-Level De-duplication as a Service","fork":true,"url":"https://api.github.com/repos/BenjamenMeyer/deuce","forks_url":"https://api.github.com/repos/BenjamenMeyer/deuce/forks","keys_url":"https://api.github.com/repos/BenjamenMeyer/deuce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BenjamenMeyer/deuce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BenjamenMeyer/deuce/teams","hooks_url":"https://api.github.com/repos/BenjamenMeyer/deuce/hooks","issue_events_url":"https://api.github.com/repos/BenjamenMeyer/deuce/issues/events{/number}","events_url":"https://api.github.com/repos/BenjamenMeyer/deuce/events","assignees_url":"https://api.github.com/repos/BenjamenMeyer/deuce/assignees{/user}","branches_url":"https://api.github.com/repos/BenjamenMeyer/deuce/branches{/branch}","tags_url":"https://api.github.com/repos/BenjamenMeyer/deuce/tags","blobs_url":"https://api.github.com/repos/BenjamenMeyer/deuce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BenjamenMeyer/deuce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BenjamenMeyer/deuce/git/refs{/sha}","trees_url":"https://api.github.com/repos/BenjamenMeyer/deuce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BenjamenMeyer/deuce/statuses/{sha}","languages_url":"https://api.github.com/repos/BenjamenMeyer/deuce/languages","stargazers_url":"https://api.github.com/repos/BenjamenMeyer/deuce/stargazers","contributors_url":"https://api.github.com/repos/BenjamenMeyer/deuce/contributors","subscribers_url":"https://api.github.com/repos/BenjamenMeyer/deuce/subscribers","subscription_url":"https://api.github.com/repos/BenjamenMeyer/deuce/subscription","commits_url":"https://api.github.com/repos/BenjamenMeyer/deuce/commits{/sha}","git_commits_url":"https://api.github.com/repos/BenjamenMeyer/deuce/git/commits{/sha}","comments_url":"https://api.github.com/repos/BenjamenMeyer/deuce/comments{/number}","issue_comment_url":"https://api.github.com/repos/BenjamenMeyer/deuce/issues/comments/{number}","contents_url":"https://api.github.com/repos/BenjamenMeyer/deuce/contents/{+path}","compare_url":"https://api.github.com/repos/BenjamenMeyer/deuce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BenjamenMeyer/deuce/merges","archive_url":"https://api.github.com/repos/BenjamenMeyer/deuce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BenjamenMeyer/deuce/downloads","issues_url":"https://api.github.com/repos/BenjamenMeyer/deuce/issues{/number}","pulls_url":"https://api.github.com/repos/BenjamenMeyer/deuce/pulls{/number}","milestones_url":"https://api.github.com/repos/BenjamenMeyer/deuce/milestones{/number}","notifications_url":"https://api.github.com/repos/BenjamenMeyer/deuce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BenjamenMeyer/deuce/labels{/name}","releases_url":"https://api.github.com/repos/BenjamenMeyer/deuce/releases{/id}","created_at":"2014-06-12T19:32:19Z","updated_at":"2015-01-21T21:42:15Z","pushed_at":"2015-01-22T16:49:31Z","git_url":"git://github.com/BenjamenMeyer/deuce.git","ssh_url":"git@github.com:BenjamenMeyer/deuce.git","clone_url":"https://github.com/BenjamenMeyer/deuce.git","svn_url":"https://github.com/BenjamenMeyer/deuce","homepage":null,"size":2601,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"rackerlabs:master","ref":"master","sha":"019c97926c5b06afe65395eb0c82fcdbcfed7555","user":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":16175898,"name":"deuce","full_name":"rackerlabs/deuce","owner":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rackerlabs/deuce","description":"Block-Level De-duplication as a Service","fork":false,"url":"https://api.github.com/repos/rackerlabs/deuce","forks_url":"https://api.github.com/repos/rackerlabs/deuce/forks","keys_url":"https://api.github.com/repos/rackerlabs/deuce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rackerlabs/deuce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rackerlabs/deuce/teams","hooks_url":"https://api.github.com/repos/rackerlabs/deuce/hooks","issue_events_url":"https://api.github.com/repos/rackerlabs/deuce/issues/events{/number}","events_url":"https://api.github.com/repos/rackerlabs/deuce/events","assignees_url":"https://api.github.com/repos/rackerlabs/deuce/assignees{/user}","branches_url":"https://api.github.com/repos/rackerlabs/deuce/branches{/branch}","tags_url":"https://api.github.com/repos/rackerlabs/deuce/tags","blobs_url":"https://api.github.com/repos/rackerlabs/deuce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rackerlabs/deuce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rackerlabs/deuce/git/refs{/sha}","trees_url":"https://api.github.com/repos/rackerlabs/deuce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rackerlabs/deuce/statuses/{sha}","languages_url":"https://api.github.com/repos/rackerlabs/deuce/languages","stargazers_url":"https://api.github.com/repos/rackerlabs/deuce/stargazers","contributors_url":"https://api.github.com/repos/rackerlabs/deuce/contributors","subscribers_url":"https://api.github.com/repos/rackerlabs/deuce/subscribers","subscription_url":"https://api.github.com/repos/rackerlabs/deuce/subscription","commits_url":"https://api.github.com/repos/rackerlabs/deuce/commits{/sha}","git_commits_url":"https://api.github.com/repos/rackerlabs/deuce/git/commits{/sha}","comments_url":"https://api.github.com/repos/rackerlabs/deuce/comments{/number}","issue_comment_url":"https://api.github.com/repos/rackerlabs/deuce/issues/comments/{number}","contents_url":"https://api.github.com/repos/rackerlabs/deuce/contents/{+path}","compare_url":"https://api.github.com/repos/rackerlabs/deuce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rackerlabs/deuce/merges","archive_url":"https://api.github.com/repos/rackerlabs/deuce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rackerlabs/deuce/downloads","issues_url":"https://api.github.com/repos/rackerlabs/deuce/issues{/number}","pulls_url":"https://api.github.com/repos/rackerlabs/deuce/pulls{/number}","milestones_url":"https://api.github.com/repos/rackerlabs/deuce/milestones{/number}","notifications_url":"https://api.github.com/repos/rackerlabs/deuce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rackerlabs/deuce/labels{/name}","releases_url":"https://api.github.com/repos/rackerlabs/deuce/releases{/id}","created_at":"2014-01-23T15:10:52Z","updated_at":"2015-01-26T14:37:00Z","pushed_at":"2015-01-26T14:37:00Z","git_url":"git://github.com/rackerlabs/deuce.git","ssh_url":"git@github.com:rackerlabs/deuce.git","clone_url":"https://github.com/rackerlabs/deuce.git","svn_url":"https://github.com/rackerlabs/deuce","homepage":null,"size":3675,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":5,"forks":6,"open_issues":5,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rackerlabs/deuce/pulls/259"},"html":{"href":"https://github.com/rackerlabs/deuce/pull/259"},"issue":{"href":"https://api.github.com/repos/rackerlabs/deuce/issues/259"},"comments":{"href":"https://api.github.com/repos/rackerlabs/deuce/issues/259/comments"},"review_comments":{"href":"https://api.github.com/repos/rackerlabs/deuce/pulls/259/comments"},"review_comment":{"href":"https://api.github.com/repos/rackerlabs/deuce/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rackerlabs/deuce/pulls/259/commits"},"statuses":{"href":"https://api.github.com/repos/rackerlabs/deuce/statuses/46e57d2bef4c9892e46bd8f7a1b47580eb9e0c35"}}}}