{"action":"created","comment":{"url":"https://api.github.com/repos/minio/minio/pulls/comments/67358396","id":67358396,"diff_hunk":"@@ -631,9 +631,11 @@ func (xl xlObjects) CompleteMultipartUpload(bucket string, object string, upload\n \n \t// Rename if an object already exists to temporary location.\n \tuniqueID := getUUID()\n-\terr = xl.renameObject(bucket, object, minioMetaBucket, path.Join(tmpMetaPrefix, uniqueID))\n-\tif err != nil {\n-\t\treturn \"\", toObjectErr(err, bucket, object)\n+\tif xl.isObject(bucket, object) {\n+\t\terr = xl.renameObject(bucket, object, minioMetaBucket, path.Join(tmpMetaPrefix, uniqueID))","path":"xl-v1-multipart.go","position":8,"original_position":8,"commit_id":"4ff9b982a94977c7641536350c1a87c423321fa8","original_commit_id":"4ff9b982a94977c7641536350c1a87c423321fa8","user":{"login":"krishnasrinivas","id":634494,"avatar_url":"https://avatars.githubusercontent.com/u/634494?v=3","gravatar_id":"","url":"https://api.github.com/users/krishnasrinivas","html_url":"https://github.com/krishnasrinivas","followers_url":"https://api.github.com/users/krishnasrinivas/followers","following_url":"https://api.github.com/users/krishnasrinivas/following{/other_user}","gists_url":"https://api.github.com/users/krishnasrinivas/gists{/gist_id}","starred_url":"https://api.github.com/users/krishnasrinivas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krishnasrinivas/subscriptions","organizations_url":"https://api.github.com/users/krishnasrinivas/orgs","repos_url":"https://api.github.com/users/krishnasrinivas/repos","events_url":"https://api.github.com/users/krishnasrinivas/events{/privacy}","received_events_url":"https://api.github.com/users/krishnasrinivas/received_events","type":"User","site_admin":false},"body":"> Is the check needed inside renameObject()? Another call is made to rename the temporary object to final location, we already know the source is an object in that case so is the check necessary?\r\n\r\nextra call inside xl.renameObject() is fine even if we know that the source is an object. It will avoid the bugs like we see now.\r\n\r\n","created_at":"2016-06-16T14:46:57Z","updated_at":"2016-06-16T14:46:57Z","html_url":"https://github.com/minio/minio/pull/1904#discussion_r67358396","pull_request_url":"https://api.github.com/repos/minio/minio/pulls/1904","_links":{"self":{"href":"https://api.github.com/repos/minio/minio/pulls/comments/67358396"},"html":{"href":"https://github.com/minio/minio/pull/1904#discussion_r67358396"},"pull_request":{"href":"https://api.github.com/repos/minio/minio/pulls/1904"}}},"pull_request":{"url":"https://api.github.com/repos/minio/minio/pulls/1904","id":73876531,"html_url":"https://github.com/minio/minio/pull/1904","diff_url":"https://github.com/minio/minio/pull/1904.diff","patch_url":"https://github.com/minio/minio/pull/1904.patch","issue_url":"https://api.github.com/repos/minio/minio/issues/1904","number":1904,"state":"open","locked":false,"title":"Unit tests for PUT ","user":{"login":"mkash32","id":11131759,"avatar_url":"https://avatars.githubusercontent.com/u/11131759?v=3","gravatar_id":"","url":"https://api.github.com/users/mkash32","html_url":"https://github.com/mkash32","followers_url":"https://api.github.com/users/mkash32/followers","following_url":"https://api.github.com/users/mkash32/following{/other_user}","gists_url":"https://api.github.com/users/mkash32/gists{/gist_id}","starred_url":"https://api.github.com/users/mkash32/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkash32/subscriptions","organizations_url":"https://api.github.com/users/mkash32/orgs","repos_url":"https://api.github.com/users/mkash32/repos","events_url":"https://api.github.com/users/mkash32/events{/privacy}","received_events_url":"https://api.github.com/users/mkash32/received_events","type":"User","site_admin":false},"body":"Unit tests for PUT object when object already exists\r\nIssue: https://github.com/minio/minio/issues/1657","created_at":"2016-06-15T09:12:25Z","updated_at":"2016-06-16T14:46:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f4fb8e71b7629963998cceaa85fae1e40ce3c66e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/minio/minio/pulls/1904/commits","review_comments_url":"https://api.github.com/repos/minio/minio/pulls/1904/comments","review_comment_url":"https://api.github.com/repos/minio/minio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/minio/minio/issues/1904/comments","statuses_url":"https://api.github.com/repos/minio/minio/statuses/4ff9b982a94977c7641536350c1a87c423321fa8","head":{"label":"mkash32:puttest","ref":"puttest","sha":"4ff9b982a94977c7641536350c1a87c423321fa8","user":{"login":"mkash32","id":11131759,"avatar_url":"https://avatars.githubusercontent.com/u/11131759?v=3","gravatar_id":"","url":"https://api.github.com/users/mkash32","html_url":"https://github.com/mkash32","followers_url":"https://api.github.com/users/mkash32/followers","following_url":"https://api.github.com/users/mkash32/following{/other_user}","gists_url":"https://api.github.com/users/mkash32/gists{/gist_id}","starred_url":"https://api.github.com/users/mkash32/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkash32/subscriptions","organizations_url":"https://api.github.com/users/mkash32/orgs","repos_url":"https://api.github.com/users/mkash32/repos","events_url":"https://api.github.com/users/mkash32/events{/privacy}","received_events_url":"https://api.github.com/users/mkash32/received_events","type":"User","site_admin":false},"repo":{"id":58350121,"name":"minio","full_name":"mkash32/minio","owner":{"login":"mkash32","id":11131759,"avatar_url":"https://avatars.githubusercontent.com/u/11131759?v=3","gravatar_id":"","url":"https://api.github.com/users/mkash32","html_url":"https://github.com/mkash32","followers_url":"https://api.github.com/users/mkash32/followers","following_url":"https://api.github.com/users/mkash32/following{/other_user}","gists_url":"https://api.github.com/users/mkash32/gists{/gist_id}","starred_url":"https://api.github.com/users/mkash32/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkash32/subscriptions","organizations_url":"https://api.github.com/users/mkash32/orgs","repos_url":"https://api.github.com/users/mkash32/repos","events_url":"https://api.github.com/users/mkash32/events{/privacy}","received_events_url":"https://api.github.com/users/mkash32/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mkash32/minio","description":"Minio is an object storage server compatible with Amazon S3 and licensed under Apache 2.0 License","fork":true,"url":"https://api.github.com/repos/mkash32/minio","forks_url":"https://api.github.com/repos/mkash32/minio/forks","keys_url":"https://api.github.com/repos/mkash32/minio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mkash32/minio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mkash32/minio/teams","hooks_url":"https://api.github.com/repos/mkash32/minio/hooks","issue_events_url":"https://api.github.com/repos/mkash32/minio/issues/events{/number}","events_url":"https://api.github.com/repos/mkash32/minio/events","assignees_url":"https://api.github.com/repos/mkash32/minio/assignees{/user}","branches_url":"https://api.github.com/repos/mkash32/minio/branches{/branch}","tags_url":"https://api.github.com/repos/mkash32/minio/tags","blobs_url":"https://api.github.com/repos/mkash32/minio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mkash32/minio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mkash32/minio/git/refs{/sha}","trees_url":"https://api.github.com/repos/mkash32/minio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mkash32/minio/statuses/{sha}","languages_url":"https://api.github.com/repos/mkash32/minio/languages","stargazers_url":"https://api.github.com/repos/mkash32/minio/stargazers","contributors_url":"https://api.github.com/repos/mkash32/minio/contributors","subscribers_url":"https://api.github.com/repos/mkash32/minio/subscribers","subscription_url":"https://api.github.com/repos/mkash32/minio/subscription","commits_url":"https://api.github.com/repos/mkash32/minio/commits{/sha}","git_commits_url":"https://api.github.com/repos/mkash32/minio/git/commits{/sha}","comments_url":"https://api.github.com/repos/mkash32/minio/comments{/number}","issue_comment_url":"https://api.github.com/repos/mkash32/minio/issues/comments{/number}","contents_url":"https://api.github.com/repos/mkash32/minio/contents/{+path}","compare_url":"https://api.github.com/repos/mkash32/minio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mkash32/minio/merges","archive_url":"https://api.github.com/repos/mkash32/minio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mkash32/minio/downloads","issues_url":"https://api.github.com/repos/mkash32/minio/issues{/number}","pulls_url":"https://api.github.com/repos/mkash32/minio/pulls{/number}","milestones_url":"https://api.github.com/repos/mkash32/minio/milestones{/number}","notifications_url":"https://api.github.com/repos/mkash32/minio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mkash32/minio/labels{/name}","releases_url":"https://api.github.com/repos/mkash32/minio/releases{/id}","deployments_url":"https://api.github.com/repos/mkash32/minio/deployments","created_at":"2016-05-09T05:15:52Z","updated_at":"2016-05-09T05:15:53Z","pushed_at":"2016-06-15T14:27:50Z","git_url":"git://github.com/mkash32/minio.git","ssh_url":"git@github.com:mkash32/minio.git","clone_url":"https://github.com/mkash32/minio.git","svn_url":"https://github.com/mkash32/minio","homepage":"https://minio.io/download/","size":13364,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"minio:master","ref":"master","sha":"de1c7d33eb4bdb456527f2e040011f6e5ee5b78a","user":{"login":"minio","id":695951,"avatar_url":"https://avatars.githubusercontent.com/u/695951?v=3","gravatar_id":"","url":"https://api.github.com/users/minio","html_url":"https://github.com/minio","followers_url":"https://api.github.com/users/minio/followers","following_url":"https://api.github.com/users/minio/following{/other_user}","gists_url":"https://api.github.com/users/minio/gists{/gist_id}","starred_url":"https://api.github.com/users/minio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minio/subscriptions","organizations_url":"https://api.github.com/users/minio/orgs","repos_url":"https://api.github.com/users/minio/repos","events_url":"https://api.github.com/users/minio/events{/privacy}","received_events_url":"https://api.github.com/users/minio/received_events","type":"Organization","site_admin":false},"repo":{"id":29261473,"name":"minio","full_name":"minio/minio","owner":{"login":"minio","id":695951,"avatar_url":"https://avatars.githubusercontent.com/u/695951?v=3","gravatar_id":"","url":"https://api.github.com/users/minio","html_url":"https://github.com/minio","followers_url":"https://api.github.com/users/minio/followers","following_url":"https://api.github.com/users/minio/following{/other_user}","gists_url":"https://api.github.com/users/minio/gists{/gist_id}","starred_url":"https://api.github.com/users/minio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minio/subscriptions","organizations_url":"https://api.github.com/users/minio/orgs","repos_url":"https://api.github.com/users/minio/repos","events_url":"https://api.github.com/users/minio/events{/privacy}","received_events_url":"https://api.github.com/users/minio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/minio/minio","description":"Minio is an object storage server compatible with Amazon S3 and licensed under Apache 2.0 License","fork":false,"url":"https://api.github.com/repos/minio/minio","forks_url":"https://api.github.com/repos/minio/minio/forks","keys_url":"https://api.github.com/repos/minio/minio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/minio/minio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/minio/minio/teams","hooks_url":"https://api.github.com/repos/minio/minio/hooks","issue_events_url":"https://api.github.com/repos/minio/minio/issues/events{/number}","events_url":"https://api.github.com/repos/minio/minio/events","assignees_url":"https://api.github.com/repos/minio/minio/assignees{/user}","branches_url":"https://api.github.com/repos/minio/minio/branches{/branch}","tags_url":"https://api.github.com/repos/minio/minio/tags","blobs_url":"https://api.github.com/repos/minio/minio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/minio/minio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/minio/minio/git/refs{/sha}","trees_url":"https://api.github.com/repos/minio/minio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/minio/minio/statuses/{sha}","languages_url":"https://api.github.com/repos/minio/minio/languages","stargazers_url":"https://api.github.com/repos/minio/minio/stargazers","contributors_url":"https://api.github.com/repos/minio/minio/contributors","subscribers_url":"https://api.github.com/repos/minio/minio/subscribers","subscription_url":"https://api.github.com/repos/minio/minio/subscription","commits_url":"https://api.github.com/repos/minio/minio/commits{/sha}","git_commits_url":"https://api.github.com/repos/minio/minio/git/commits{/sha}","comments_url":"https://api.github.com/repos/minio/minio/comments{/number}","issue_comment_url":"https://api.github.com/repos/minio/minio/issues/comments{/number}","contents_url":"https://api.github.com/repos/minio/minio/contents/{+path}","compare_url":"https://api.github.com/repos/minio/minio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/minio/minio/merges","archive_url":"https://api.github.com/repos/minio/minio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/minio/minio/downloads","issues_url":"https://api.github.com/repos/minio/minio/issues{/number}","pulls_url":"https://api.github.com/repos/minio/minio/pulls{/number}","milestones_url":"https://api.github.com/repos/minio/minio/milestones{/number}","notifications_url":"https://api.github.com/repos/minio/minio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/minio/minio/labels{/name}","releases_url":"https://api.github.com/repos/minio/minio/releases{/id}","deployments_url":"https://api.github.com/repos/minio/minio/deployments","created_at":"2015-01-14T19:23:58Z","updated_at":"2016-06-16T13:38:20Z","pushed_at":"2016-06-16T11:02:54Z","git_url":"git://github.com/minio/minio.git","ssh_url":"git@github.com:minio/minio.git","clone_url":"https://github.com/minio/minio.git","svn_url":"https://github.com/minio/minio","homepage":"https://minio.io/downloads/","size":14732,"stargazers_count":1371,"watchers_count":1371,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":127,"mirror_url":null,"open_issues_count":51,"forks":127,"open_issues":51,"watchers":1371,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/minio/minio/pulls/1904"},"html":{"href":"https://github.com/minio/minio/pull/1904"},"issue":{"href":"https://api.github.com/repos/minio/minio/issues/1904"},"comments":{"href":"https://api.github.com/repos/minio/minio/issues/1904/comments"},"review_comments":{"href":"https://api.github.com/repos/minio/minio/pulls/1904/comments"},"review_comment":{"href":"https://api.github.com/repos/minio/minio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/minio/minio/pulls/1904/commits"},"statuses":{"href":"https://api.github.com/repos/minio/minio/statuses/4ff9b982a94977c7641536350c1a87c423321fa8"}}}}
{"actor":{"display_login":"krishnasrinivas"}}