GitHub PullRequestReviewCommentEvent at 2014-09-13 05:11:24
Repository: spark
Actor: rxin
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/17510517","id":17510517,"diff_hunk":"@@ -1046,41 +1046,37 @@ class DAGScheduler(\n \n       case FetchFailed(bmAddress, shuffleId, mapId, reduceId) =>\n         val failedStage = stageIdToStage(task.stageId)\n-        val mapStage = shuffleToMapStage(shuffleId)\n \n         // It is likely that we receive multiple FetchFailed for a single stage (because we have\n         // multiple tasks running concurrently on different executors). In that case, it is possible\n         // the fetch failure has already been handled by the scheduler.\n-        if (runningStages.contains(failedStage)) {\n+        if (runningStages.contains(failedStage) && stage.pendingTasks.contains(task)) {\n+          val mapStage = shuffleToMapStage(shuffleId)\n           logInfo(s\"Marking $failedStage (${failedStage.name}) as failed \" +\n             s\"due to a fetch failure from $mapStage (${mapStage.name})\")\n-          markStageAsFinished(failedStage, Some(\"Fetch failure\"))\n-          runningStages -= failedStage\n-        }\n-\n-        if (failedStages.isEmpty && eventProcessActor != null) {\n-          // Don't schedule an event to resubmit failed stages if failed isn't empty, because\n-          // in that case the event will already have been scheduled. eventProcessActor may be\n-          // null during unit tests.\n           // TODO: Cancel running tasks in the stage\n-          import env.actorSystem.dispatcher\n-          logInfo(s\"Resubmitting $mapStage (${mapStage.name}) and \" +\n-            s\"$failedStage (${failedStage.name}) due to fetch failure\")\n-          env.actorSystem.scheduler.scheduleOnce(\n-            RESUBMIT_TIMEOUT, eventProcessActor, ResubmitFailedStages)\n-        }\n-        failedStages += failedStage\n-        failedStages += mapStage\n+          markStageAsFinished(failedStage, Some(\"Fetch failure\"))\n+          if (eventProcessActor != null) {\n+            // eventProcessActor may be null during unit tests.\n+            import env.actorSystem.dispatcher\n+            logInfo(s\"Resubmitting $mapStage (${mapStage.name}) and \" +\n+              s\"$failedStage (${failedStage.name}) due to fetch failure\")\n+            env.actorSystem.scheduler.scheduleOnce(\n+              RESUBMIT_TIMEOUT, eventProcessActor, ResubmitFailedStages)\n+          }\n+          failedStages += failedStage\n+          failedStages += mapStage\n \n-        // Mark the map whose fetch failed as broken in the map stage\n-        if (mapId != -1) {\n-          mapStage.removeOutputLoc(mapId, bmAddress)\n-          mapOutputTracker.unregisterMapOutput(shuffleId, mapId, bmAddress)\n-        }\n+          // Mark the map whose fetch failed as broken in the map stage\n+          if (mapId != -1) {\n+            mapStage.removeOutputLoc(mapId, bmAddress)\n+            mapOutputTracker.unregisterMapOutput(shuffleId, mapId, bmAddress)\n+          }\n \n-        // TODO: mark the executor as failed only if there were lots of fetch failures on it\n-        if (bmAddress != null) {\n-          handleExecutorLost(bmAddress.executorId, Some(task.epoch))\n+          // TODO: mark the executor as failed only if there were lots of fetch failures on it\n+          if (bmAddress != null) {","path":"core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala","position":58,"original_position":58,"commit_id":"bf6f81a602c84c0d016c0f71cb93d567ce05d185","original_commit_id":"bf6f81a602c84c0d016c0f71cb93d567ce05d185","user":{"login":"rxin","id":323388,"avatar_url":"https://avatars.githubusercontent.com/u/323388?v=2","gravatar_id":"73bfac91877fce35c6d20e16e9e53677","url":"https://api.github.com/users/rxin","html_url":"https://github.com/rxin","followers_url":"https://api.github.com/users/rxin/followers","following_url":"https://api.github.com/users/rxin/following{/other_user}","gists_url":"https://api.github.com/users/rxin/gists{/gist_id}","starred_url":"https://api.github.com/users/rxin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rxin/subscriptions","organizations_url":"https://api.github.com/users/rxin/orgs","repos_url":"https://api.github.com/users/rxin/repos","events_url":"https://api.github.com/users/rxin/events{/privacy}","received_events_url":"https://api.github.com/users/rxin/received_events","type":"User","site_admin":false},"body":"once you put this within the conditional statement, only one executor failure will be handled for each stage. that means if there are two executor fails, the 2nd one gets ignored by the dagscheduler, isn't it?","created_at":"2014-09-13T05:11:24Z","updated_at":"2014-09-13T05:11:24Z","html_url":"https://github.com/apache/spark/pull/1877#discussion_r17510517","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/1877","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/17510517"},"html":{"href":"https://github.com/apache/spark/pull/1877#discussion_r17510517"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/1877"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/1877","id":19574219,"html_url":"https://github.com/apache/spark/pull/1877","diff_url":"https://github.com/apache/spark/pull/1877.diff","patch_url":"https://github.com/apache/spark/pull/1877.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/1877","number":1877,"state":"open","locked":false,"title":"[SPARK-2947] DAGScheduler resubmit the stage into an infinite loop","user":{"login":"witgo","id":302879,"avatar_url":"https://avatars.githubusercontent.com/u/302879?v=2","gravatar_id":"82f14c57ba7522241b0e3c67d759609e","url":"https://api.github.com/users/witgo","html_url":"https://github.com/witgo","followers_url":"https://api.github.com/users/witgo/followers","following_url":"https://api.github.com/users/witgo/following{/other_user}","gists_url":"https://api.github.com/users/witgo/gists{/gist_id}","starred_url":"https://api.github.com/users/witgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/witgo/subscriptions","organizations_url":"https://api.github.com/users/witgo/orgs","repos_url":"https://api.github.com/users/witgo/repos","events_url":"https://api.github.com/users/witgo/events{/privacy}","received_events_url":"https://api.github.com/users/witgo/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-08-10T15:05:47Z","updated_at":"2014-09-13T05:11:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7bcf8f0ff275cadc0eadc037669181ea5703a7f0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/1877/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/1877/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments/{number}","comments_url":"https://api.github.com/repos/apache/spark/issues/1877/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/bf6f81a602c84c0d016c0f71cb93d567ce05d185","head":{"label":"witgo:SPARK-2947","ref":"SPARK-2947","sha":"bf6f81a602c84c0d016c0f71cb93d567ce05d185","user":{"login":"witgo","id":302879,"avatar_url":"https://avatars.githubusercontent.com/u/302879?v=2","gravatar_id":"82f14c57ba7522241b0e3c67d759609e","url":"https://api.github.com/users/witgo","html_url":"https://github.com/witgo","followers_url":"https://api.github.com/users/witgo/followers","following_url":"https://api.github.com/users/witgo/following{/other_user}","gists_url":"https://api.github.com/users/witgo/gists{/gist_id}","starred_url":"https://api.github.com/users/witgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/witgo/subscriptions","organizations_url":"https://api.github.com/users/witgo/orgs","repos_url":"https://api.github.com/users/witgo/repos","events_url":"https://api.github.com/users/witgo/events{/privacy}","received_events_url":"https://api.github.com/users/witgo/received_events","type":"User","site_admin":false},"repo":{"id":17201985,"name":"spark","full_name":"witgo/spark","owner":{"login":"witgo","id":302879,"avatar_url":"https://avatars.githubusercontent.com/u/302879?v=2","gravatar_id":"82f14c57ba7522241b0e3c67d759609e","url":"https://api.github.com/users/witgo","html_url":"https://github.com/witgo","followers_url":"https://api.github.com/users/witgo/followers","following_url":"https://api.github.com/users/witgo/following{/other_user}","gists_url":"https://api.github.com/users/witgo/gists{/gist_id}","starred_url":"https://api.github.com/users/witgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/witgo/subscriptions","organizations_url":"https://api.github.com/users/witgo/orgs","repos_url":"https://api.github.com/users/witgo/repos","events_url":"https://api.github.com/users/witgo/events{/privacy}","received_events_url":"https://api.github.com/users/witgo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/witgo/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/witgo/spark","forks_url":"https://api.github.com/repos/witgo/spark/forks","keys_url":"https://api.github.com/repos/witgo/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/witgo/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/witgo/spark/teams","hooks_url":"https://api.github.com/repos/witgo/spark/hooks","issue_events_url":"https://api.github.com/repos/witgo/spark/issues/events{/number}","events_url":"https://api.github.com/repos/witgo/spark/events","assignees_url":"https://api.github.com/repos/witgo/spark/assignees{/user}","branches_url":"https://api.github.com/repos/witgo/spark/branches{/branch}","tags_url":"https://api.github.com/repos/witgo/spark/tags","blobs_url":"https://api.github.com/repos/witgo/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/witgo/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/witgo/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/witgo/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/witgo/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/witgo/spark/languages","stargazers_url":"https://api.github.com/repos/witgo/spark/stargazers","contributors_url":"https://api.github.com/repos/witgo/spark/contributors","subscribers_url":"https://api.github.com/repos/witgo/spark/subscribers","subscription_url":"https://api.github.com/repos/witgo/spark/subscription","commits_url":"https://api.github.com/repos/witgo/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/witgo/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/witgo/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/witgo/spark/issues/comments/{number}","contents_url":"https://api.github.com/repos/witgo/spark/contents/{+path}","compare_url":"https://api.github.com/repos/witgo/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/witgo/spark/merges","archive_url":"https://api.github.com/repos/witgo/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/witgo/spark/downloads","issues_url":"https://api.github.com/repos/witgo/spark/issues{/number}","pulls_url":"https://api.github.com/repos/witgo/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/witgo/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/witgo/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/witgo/spark/labels{/name}","releases_url":"https://api.github.com/repos/witgo/spark/releases{/id}","created_at":"2014-02-26T06:58:08Z","updated_at":"2014-07-09T07:08:17Z","pushed_at":"2014-09-13T02:34:32Z","git_url":"git://github.com/witgo/spark.git","ssh_url":"git@github.com:witgo/spark.git","clone_url":"https://github.com/witgo/spark.git","svn_url":"https://github.com/witgo/spark","homepage":null,"size":82717,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":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":"27df6ce6a2e6ba2142329f35e1670da184cb384c","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=2","gravatar_id":"a676c0bf448fcd49f588249ead719b4c","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=2","gravatar_id":"a676c0bf448fcd49f588249ead719b4c","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":"2014-09-13T04:12:10Z","pushed_at":"2014-09-13T04:58:29Z","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":3095344,"stargazers_count":1448,"watchers_count":1448,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":1291,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":228,"forks":1291,"open_issues":228,"watchers":1448,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/1877"},"html":{"href":"https://github.com/apache/spark/pull/1877"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/1877"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/1877/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/1877/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/1877/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/bf6f81a602c84c0d016c0f71cb93d567ce05d185"}}}}