{"action":"created","comment":{"url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/pulls/comments/77532735","id":77532735,"diff_hunk":"@@ -57,6 +61,8 @@ func (master *Master) runOperation(remoteWorker *RemoteWorker, operation *Operat\n \tif err != nil {\n \t\tlog.Printf(\"Operation %v '%v' Failed. Error: %v\\n\", operation.proc, operation.id, err)\n \t\twg.Done()\n+        master.pendingOperations[operation.filePath] = operation // Store current filePath operation for further reprocessing; used in schedule() (see (**) above);\n+        master.filePathChan <- operation.filePath // (*) Re-schedule current filePath;","path":"mapreduce/master_scheduler.go","position":26,"original_position":26,"commit_id":"44be88c029e62beb139f40375657e438ef8dacfa","original_commit_id":"44be88c029e62beb139f40375657e438ef8dacfa","user":{"login":"PauloAguiar","id":1757521,"avatar_url":"https://avatars.githubusercontent.com/u/1757521?v=3","gravatar_id":"","url":"https://api.github.com/users/PauloAguiar","html_url":"https://github.com/PauloAguiar","followers_url":"https://api.github.com/users/PauloAguiar/followers","following_url":"https://api.github.com/users/PauloAguiar/following{/other_user}","gists_url":"https://api.github.com/users/PauloAguiar/gists{/gist_id}","starred_url":"https://api.github.com/users/PauloAguiar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PauloAguiar/subscriptions","organizations_url":"https://api.github.com/users/PauloAguiar/orgs","repos_url":"https://api.github.com/users/PauloAguiar/repos","events_url":"https://api.github.com/users/PauloAguiar/events{/privacy}","received_events_url":"https://api.github.com/users/PauloAguiar/received_events","type":"User","site_admin":false},"body":"Carlos,\r\n\r\nNessa linha aqui temos um problema que pode gerar falhas.  Esse canal, filePathChan, é externo ao código do pacote mapreduce. Isso quer dizer que o código externo é responsável por terminá-lo. Como o seu código reutiliza esse canal, você não tem como ter certeza que está escrevendo num canal válido, e isso pode gerar um panic (por exemplo https://play.golang.org/p/KU7MLrFQSx). Eu deveria ter utilizado o indicador <- no channel para indicar a uni-direcionalidade, mas isso estava causando muita confusão e  eu acabei omitindo. A minha sugestão é que você crie um novo canal ao invés de tentar reutilizar esse, dessa forma temos uma estrutura mais interessante:\r\n\r\n![Pattern](http://i.imgur.com/m6Igz9d.png)","created_at":"2016-09-05T14:52:10Z","updated_at":"2016-09-05T14:52:10Z","html_url":"https://github.com/PauloAguiar/ces27-lab1-part2/pull/3#discussion_r77532735","pull_request_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/pulls/comments/77532735"},"html":{"href":"https://github.com/PauloAguiar/ces27-lab1-part2/pull/3#discussion_r77532735"},"pull_request":{"href":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/pulls/3","id":83932959,"html_url":"https://github.com/PauloAguiar/ces27-lab1-part2/pull/3","diff_url":"https://github.com/PauloAguiar/ces27-lab1-part2/pull/3.diff","patch_url":"https://github.com/PauloAguiar/ces27-lab1-part2/pull/3.patch","issue_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/issues/3","number":3,"state":"open","locked":false,"title":"Implementação do tratamento de erros para o MapReduce/Wordcount","user":{"login":"cballock","id":1802608,"avatar_url":"https://avatars.githubusercontent.com/u/1802608?v=3","gravatar_id":"","url":"https://api.github.com/users/cballock","html_url":"https://github.com/cballock","followers_url":"https://api.github.com/users/cballock/followers","following_url":"https://api.github.com/users/cballock/following{/other_user}","gists_url":"https://api.github.com/users/cballock/gists{/gist_id}","starred_url":"https://api.github.com/users/cballock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cballock/subscriptions","organizations_url":"https://api.github.com/users/cballock/orgs","repos_url":"https://api.github.com/users/cballock/repos","events_url":"https://api.github.com/users/cballock/events{/privacy}","received_events_url":"https://api.github.com/users/cballock/received_events","type":"User","site_admin":false},"body":"Boa tarde, Paulo.\r\nSegue minha primeira versão para a parte 2 do Laboratório 1. Por favor, você poderia fazer uma revisão do meu código?\r\nAproveitando, verifiquei um comportamento estranho na execução do _framework_: quando o arquivo é pequeno e existem múltiplos _workers_, em todas as vezes que eu testei, o _master_ acabava atribuindo todos os _chunks_ para um único _worker_ enquanto todos os demais estavam no período de _sleep_ de 2 segundos. Como efeito colateral, nenhum destes _workers_ que estavam dormindo foram devidamente encerrados após o término do _master_.\r\nAbraços,\r\n\r\nBallock.","created_at":"2016-09-04T20:22:14Z","updated_at":"2016-09-05T14:52:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e4d2d4ab8f073a1cf9c21d1f7aba27391d08b17f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/pulls/3/commits","review_comments_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/pulls/3/comments","review_comment_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/issues/3/comments","statuses_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/statuses/44be88c029e62beb139f40375657e438ef8dacfa","head":{"label":"cballock:master","ref":"master","sha":"44be88c029e62beb139f40375657e438ef8dacfa","user":{"login":"cballock","id":1802608,"avatar_url":"https://avatars.githubusercontent.com/u/1802608?v=3","gravatar_id":"","url":"https://api.github.com/users/cballock","html_url":"https://github.com/cballock","followers_url":"https://api.github.com/users/cballock/followers","following_url":"https://api.github.com/users/cballock/following{/other_user}","gists_url":"https://api.github.com/users/cballock/gists{/gist_id}","starred_url":"https://api.github.com/users/cballock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cballock/subscriptions","organizations_url":"https://api.github.com/users/cballock/orgs","repos_url":"https://api.github.com/users/cballock/repos","events_url":"https://api.github.com/users/cballock/events{/privacy}","received_events_url":"https://api.github.com/users/cballock/received_events","type":"User","site_admin":false},"repo":{"id":67365868,"name":"ces27-lab1-part2","full_name":"cballock/ces27-lab1-part2","owner":{"login":"cballock","id":1802608,"avatar_url":"https://avatars.githubusercontent.com/u/1802608?v=3","gravatar_id":"","url":"https://api.github.com/users/cballock","html_url":"https://github.com/cballock","followers_url":"https://api.github.com/users/cballock/followers","following_url":"https://api.github.com/users/cballock/following{/other_user}","gists_url":"https://api.github.com/users/cballock/gists{/gist_id}","starred_url":"https://api.github.com/users/cballock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cballock/subscriptions","organizations_url":"https://api.github.com/users/cballock/orgs","repos_url":"https://api.github.com/users/cballock/repos","events_url":"https://api.github.com/users/cballock/events{/privacy}","received_events_url":"https://api.github.com/users/cballock/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cballock/ces27-lab1-part2","description":" CES27 - Distributed Systems - Course Assignment #1 - Part 2","fork":true,"url":"https://api.github.com/repos/cballock/ces27-lab1-part2","forks_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/forks","keys_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/teams","hooks_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/hooks","issue_events_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/issues/events{/number}","events_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/events","assignees_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/assignees{/user}","branches_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/branches{/branch}","tags_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/tags","blobs_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/git/refs{/sha}","trees_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/statuses/{sha}","languages_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/languages","stargazers_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/stargazers","contributors_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/contributors","subscribers_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/subscribers","subscription_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/subscription","commits_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/commits{/sha}","git_commits_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/git/commits{/sha}","comments_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/comments{/number}","issue_comment_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/issues/comments{/number}","contents_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/contents/{+path}","compare_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/merges","archive_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/downloads","issues_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/issues{/number}","pulls_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/pulls{/number}","milestones_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/milestones{/number}","notifications_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/labels{/name}","releases_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/releases{/id}","deployments_url":"https://api.github.com/repos/cballock/ces27-lab1-part2/deployments","created_at":"2016-09-04T20:08:45Z","updated_at":"2016-09-04T20:08:46Z","pushed_at":"2016-09-04T20:12:18Z","git_url":"git://github.com/cballock/ces27-lab1-part2.git","ssh_url":"git@github.com:cballock/ces27-lab1-part2.git","clone_url":"https://github.com/cballock/ces27-lab1-part2.git","svn_url":"https://github.com/cballock/ces27-lab1-part2","homepage":null,"size":479,"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":"PauloAguiar:master","ref":"master","sha":"cca57c7d9df49424e7a36f6906a7aa41ed3b511f","user":{"login":"PauloAguiar","id":1757521,"avatar_url":"https://avatars.githubusercontent.com/u/1757521?v=3","gravatar_id":"","url":"https://api.github.com/users/PauloAguiar","html_url":"https://github.com/PauloAguiar","followers_url":"https://api.github.com/users/PauloAguiar/followers","following_url":"https://api.github.com/users/PauloAguiar/following{/other_user}","gists_url":"https://api.github.com/users/PauloAguiar/gists{/gist_id}","starred_url":"https://api.github.com/users/PauloAguiar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PauloAguiar/subscriptions","organizations_url":"https://api.github.com/users/PauloAguiar/orgs","repos_url":"https://api.github.com/users/PauloAguiar/repos","events_url":"https://api.github.com/users/PauloAguiar/events{/privacy}","received_events_url":"https://api.github.com/users/PauloAguiar/received_events","type":"User","site_admin":false},"repo":{"id":67106099,"name":"ces27-lab1-part2","full_name":"PauloAguiar/ces27-lab1-part2","owner":{"login":"PauloAguiar","id":1757521,"avatar_url":"https://avatars.githubusercontent.com/u/1757521?v=3","gravatar_id":"","url":"https://api.github.com/users/PauloAguiar","html_url":"https://github.com/PauloAguiar","followers_url":"https://api.github.com/users/PauloAguiar/followers","following_url":"https://api.github.com/users/PauloAguiar/following{/other_user}","gists_url":"https://api.github.com/users/PauloAguiar/gists{/gist_id}","starred_url":"https://api.github.com/users/PauloAguiar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PauloAguiar/subscriptions","organizations_url":"https://api.github.com/users/PauloAguiar/orgs","repos_url":"https://api.github.com/users/PauloAguiar/repos","events_url":"https://api.github.com/users/PauloAguiar/events{/privacy}","received_events_url":"https://api.github.com/users/PauloAguiar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/PauloAguiar/ces27-lab1-part2","description":" CES27 - Distributed Systems - Course Assignment #1 - Part 2","fork":false,"url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2","forks_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/forks","keys_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/teams","hooks_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/hooks","issue_events_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/issues/events{/number}","events_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/events","assignees_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/assignees{/user}","branches_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/branches{/branch}","tags_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/tags","blobs_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/git/refs{/sha}","trees_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/statuses/{sha}","languages_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/languages","stargazers_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/stargazers","contributors_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/contributors","subscribers_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/subscribers","subscription_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/subscription","commits_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/commits{/sha}","git_commits_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/git/commits{/sha}","comments_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/comments{/number}","issue_comment_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/issues/comments{/number}","contents_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/contents/{+path}","compare_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/merges","archive_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/downloads","issues_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/issues{/number}","pulls_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/pulls{/number}","milestones_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/milestones{/number}","notifications_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/labels{/name}","releases_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/releases{/id}","deployments_url":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/deployments","created_at":"2016-09-01T06:52:59Z","updated_at":"2016-09-01T06:53:38Z","pushed_at":"2016-09-04T20:22:15Z","git_url":"git://github.com/PauloAguiar/ces27-lab1-part2.git","ssh_url":"git@github.com:PauloAguiar/ces27-lab1-part2.git","clone_url":"https://github.com/PauloAguiar/ces27-lab1-part2.git","svn_url":"https://github.com/PauloAguiar/ces27-lab1-part2","homepage":null,"size":477,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":3,"forks":8,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/pulls/3"},"html":{"href":"https://github.com/PauloAguiar/ces27-lab1-part2/pull/3"},"issue":{"href":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/issues/3"},"comments":{"href":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/PauloAguiar/ces27-lab1-part2/statuses/44be88c029e62beb139f40375657e438ef8dacfa"}}}}
{"actor":{"display_login":"PauloAguiar"}}