{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/33255398","id":33255398,"diff_hunk":"@@ -833,8 +833,10 @@ private[spark] class BlockManager(\n     logDebug(\"Put block %s locally took %s\".format(blockId, Utils.getUsedTimeMs(startTimeMs)))\n \n     // Either we're storing bytes and we asynchronously started replication, or we're storing\n-    // values and need to serialize and replicate them now:\n-    if (putLevel.replication > 1) {\n+    // values and need to serialize and replicate them now.\n+    // Should not replicate the block if its StorageLevel is StorageLevel.NONE or\n+    // putting it to local is failed.\n+    if (!putBlockInfo.isFailed && putLevel.replication > 1) {","path":"core/src/main/scala/org/apache/spark/storage/BlockManager.scala","position":9,"original_position":9,"commit_id":"b589c99554101bb21e3261385e4e854516e8c852","original_commit_id":"b589c99554101bb21e3261385e4e854516e8c852","user":{"login":"squito","id":71240,"avatar_url":"https://avatars.githubusercontent.com/u/71240?v=3","gravatar_id":"","url":"https://api.github.com/users/squito","html_url":"https://github.com/squito","followers_url":"https://api.github.com/users/squito/followers","following_url":"https://api.github.com/users/squito/following{/other_user}","gists_url":"https://api.github.com/users/squito/gists{/gist_id}","starred_url":"https://api.github.com/users/squito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squito/subscriptions","organizations_url":"https://api.github.com/users/squito/orgs","repos_url":"https://api.github.com/users/squito/repos","events_url":"https://api.github.com/users/squito/events{/privacy}","received_events_url":"https://api.github.com/users/squito/received_events","type":"User","site_admin":false},"body":"I think the comment about `StorageLevel` is no longer relevant, right?  Also I prefer the extended comment explained *why* this is necessary, eg. something along the lines of:\r\n\r\nReplicating requires enough memory for the whole serialized block.  But if we failed to put the block locally, that means we didn't have enough memory, so we shouldn't try to replicate.","created_at":"2015-06-25T13:41:41Z","updated_at":"2015-06-25T13:41:41Z","html_url":"https://github.com/apache/spark/pull/6990#discussion_r33255398","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/6990","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/33255398"},"html":{"href":"https://github.com/apache/spark/pull/6990#discussion_r33255398"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/6990"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/6990","id":38452083,"html_url":"https://github.com/apache/spark/pull/6990","diff_url":"https://github.com/apache/spark/pull/6990.diff","patch_url":"https://github.com/apache/spark/pull/6990.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/6990","number":6990,"state":"open","locked":false,"title":"[SPARK-8591][CORE]Block failed to unroll to memory should not be repl…","user":{"login":"dibbhatt","id":4491803,"avatar_url":"https://avatars.githubusercontent.com/u/4491803?v=3","gravatar_id":"","url":"https://api.github.com/users/dibbhatt","html_url":"https://github.com/dibbhatt","followers_url":"https://api.github.com/users/dibbhatt/followers","following_url":"https://api.github.com/users/dibbhatt/following{/other_user}","gists_url":"https://api.github.com/users/dibbhatt/gists{/gist_id}","starred_url":"https://api.github.com/users/dibbhatt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dibbhatt/subscriptions","organizations_url":"https://api.github.com/users/dibbhatt/orgs","repos_url":"https://api.github.com/users/dibbhatt/repos","events_url":"https://api.github.com/users/dibbhatt/events{/privacy}","received_events_url":"https://api.github.com/users/dibbhatt/received_events","type":"User","site_admin":false},"body":"Block failed to unroll to memory should not be replicated for MEMORY_ONLY_2 StorageLevel","created_at":"2015-06-24T15:07:05Z","updated_at":"2015-06-25T13:41:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"75783d21948d330aeaf8414dd69a6c7d434aa57e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/6990/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/6990/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/6990/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/b589c99554101bb21e3261385e4e854516e8c852","head":{"label":"dibbhatt:master","ref":"master","sha":"b589c99554101bb21e3261385e4e854516e8c852","user":{"login":"dibbhatt","id":4491803,"avatar_url":"https://avatars.githubusercontent.com/u/4491803?v=3","gravatar_id":"","url":"https://api.github.com/users/dibbhatt","html_url":"https://github.com/dibbhatt","followers_url":"https://api.github.com/users/dibbhatt/followers","following_url":"https://api.github.com/users/dibbhatt/following{/other_user}","gists_url":"https://api.github.com/users/dibbhatt/gists{/gist_id}","starred_url":"https://api.github.com/users/dibbhatt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dibbhatt/subscriptions","organizations_url":"https://api.github.com/users/dibbhatt/orgs","repos_url":"https://api.github.com/users/dibbhatt/repos","events_url":"https://api.github.com/users/dibbhatt/events{/privacy}","received_events_url":"https://api.github.com/users/dibbhatt/received_events","type":"User","site_admin":false},"repo":{"id":37986031,"name":"spark","full_name":"dibbhatt/spark","owner":{"login":"dibbhatt","id":4491803,"avatar_url":"https://avatars.githubusercontent.com/u/4491803?v=3","gravatar_id":"","url":"https://api.github.com/users/dibbhatt","html_url":"https://github.com/dibbhatt","followers_url":"https://api.github.com/users/dibbhatt/followers","following_url":"https://api.github.com/users/dibbhatt/following{/other_user}","gists_url":"https://api.github.com/users/dibbhatt/gists{/gist_id}","starred_url":"https://api.github.com/users/dibbhatt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dibbhatt/subscriptions","organizations_url":"https://api.github.com/users/dibbhatt/orgs","repos_url":"https://api.github.com/users/dibbhatt/repos","events_url":"https://api.github.com/users/dibbhatt/events{/privacy}","received_events_url":"https://api.github.com/users/dibbhatt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dibbhatt/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/dibbhatt/spark","forks_url":"https://api.github.com/repos/dibbhatt/spark/forks","keys_url":"https://api.github.com/repos/dibbhatt/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dibbhatt/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dibbhatt/spark/teams","hooks_url":"https://api.github.com/repos/dibbhatt/spark/hooks","issue_events_url":"https://api.github.com/repos/dibbhatt/spark/issues/events{/number}","events_url":"https://api.github.com/repos/dibbhatt/spark/events","assignees_url":"https://api.github.com/repos/dibbhatt/spark/assignees{/user}","branches_url":"https://api.github.com/repos/dibbhatt/spark/branches{/branch}","tags_url":"https://api.github.com/repos/dibbhatt/spark/tags","blobs_url":"https://api.github.com/repos/dibbhatt/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dibbhatt/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dibbhatt/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/dibbhatt/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dibbhatt/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/dibbhatt/spark/languages","stargazers_url":"https://api.github.com/repos/dibbhatt/spark/stargazers","contributors_url":"https://api.github.com/repos/dibbhatt/spark/contributors","subscribers_url":"https://api.github.com/repos/dibbhatt/spark/subscribers","subscription_url":"https://api.github.com/repos/dibbhatt/spark/subscription","commits_url":"https://api.github.com/repos/dibbhatt/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/dibbhatt/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/dibbhatt/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/dibbhatt/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/dibbhatt/spark/contents/{+path}","compare_url":"https://api.github.com/repos/dibbhatt/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dibbhatt/spark/merges","archive_url":"https://api.github.com/repos/dibbhatt/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dibbhatt/spark/downloads","issues_url":"https://api.github.com/repos/dibbhatt/spark/issues{/number}","pulls_url":"https://api.github.com/repos/dibbhatt/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/dibbhatt/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/dibbhatt/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dibbhatt/spark/labels{/name}","releases_url":"https://api.github.com/repos/dibbhatt/spark/releases{/id}","created_at":"2015-06-24T13:30:14Z","updated_at":"2015-06-24T13:30:36Z","pushed_at":"2015-06-25T12:43:52Z","git_url":"git://github.com/dibbhatt/spark.git","ssh_url":"git@github.com:dibbhatt/spark.git","clone_url":"https://github.com/dibbhatt/spark.git","svn_url":"https://github.com/dibbhatt/spark","homepage":null,"size":110776,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"apache:master","ref":"master","sha":"cc465fd92482737c21971d82e30d4cf247acf932","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":17165658,"name":"spark","full_name":"apache/spark","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/spark","description":"Mirror of Apache Spark","fork":false,"url":"https://api.github.com/repos/apache/spark","forks_url":"https://api.github.com/repos/apache/spark/forks","keys_url":"https://api.github.com/repos/apache/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/spark/teams","hooks_url":"https://api.github.com/repos/apache/spark/hooks","issue_events_url":"https://api.github.com/repos/apache/spark/issues/events{/number}","events_url":"https://api.github.com/repos/apache/spark/events","assignees_url":"https://api.github.com/repos/apache/spark/assignees{/user}","branches_url":"https://api.github.com/repos/apache/spark/branches{/branch}","tags_url":"https://api.github.com/repos/apache/spark/tags","blobs_url":"https://api.github.com/repos/apache/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/spark/languages","stargazers_url":"https://api.github.com/repos/apache/spark/stargazers","contributors_url":"https://api.github.com/repos/apache/spark/contributors","subscribers_url":"https://api.github.com/repos/apache/spark/subscribers","subscription_url":"https://api.github.com/repos/apache/spark/subscription","commits_url":"https://api.github.com/repos/apache/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/spark/contents/{+path}","compare_url":"https://api.github.com/repos/apache/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/spark/merges","archive_url":"https://api.github.com/repos/apache/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/spark/downloads","issues_url":"https://api.github.com/repos/apache/spark/issues{/number}","pulls_url":"https://api.github.com/repos/apache/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/spark/labels{/name}","releases_url":"https://api.github.com/repos/apache/spark/releases{/id}","created_at":"2014-02-25T08:00:08Z","updated_at":"2015-06-25T11:11:28Z","pushed_at":"2015-06-25T13:28:17Z","git_url":"git://github.com/apache/spark.git","ssh_url":"git@github.com:apache/spark.git","clone_url":"https://github.com/apache/spark.git","svn_url":"https://github.com/apache/spark","homepage":null,"size":1514733,"stargazers_count":4531,"watchers_count":4531,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3993,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":353,"forks":3993,"open_issues":353,"watchers":4531,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/6990"},"html":{"href":"https://github.com/apache/spark/pull/6990"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/6990"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/6990/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/6990/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/6990/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/b589c99554101bb21e3261385e4e854516e8c852"}}}}