{"action":"created","issue":{"url":"https://api.github.com/repos/prestodb/presto/issues/4755","repository_url":"https://api.github.com/repos/prestodb/presto","labels_url":"https://api.github.com/repos/prestodb/presto/issues/4755/labels{/name}","comments_url":"https://api.github.com/repos/prestodb/presto/issues/4755/comments","events_url":"https://api.github.com/repos/prestodb/presto/issues/4755/events","html_url":"https://github.com/prestodb/presto/pull/4755","id":140083159,"number":4755,"title":"Skip add splits on completed remote source","user":{"login":"miniway","id":725129,"avatar_url":"https://avatars.githubusercontent.com/u/725129?v=3","gravatar_id":"","url":"https://api.github.com/users/miniway","html_url":"https://github.com/miniway","followers_url":"https://api.github.com/users/miniway/followers","following_url":"https://api.github.com/users/miniway/following{/other_user}","gists_url":"https://api.github.com/users/miniway/gists{/gist_id}","starred_url":"https://api.github.com/users/miniway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miniway/subscriptions","organizations_url":"https://api.github.com/users/miniway/orgs","repos_url":"https://api.github.com/users/miniway/repos","events_url":"https://api.github.com/users/miniway/events{/privacy}","received_events_url":"https://api.github.com/users/miniway/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/prestodb/presto/labels/changes-requested","name":"changes-requested","color":"fbca04"},{"url":"https://api.github.com/repos/prestodb/presto/labels/CLA%20Signed","name":"CLA Signed","color":"ededed"}],"state":"closed","locked":false,"assignee":{"login":"dain","id":58298,"avatar_url":"https://avatars.githubusercontent.com/u/58298?v=3","gravatar_id":"","url":"https://api.github.com/users/dain","html_url":"https://github.com/dain","followers_url":"https://api.github.com/users/dain/followers","following_url":"https://api.github.com/users/dain/following{/other_user}","gists_url":"https://api.github.com/users/dain/gists{/gist_id}","starred_url":"https://api.github.com/users/dain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dain/subscriptions","organizations_url":"https://api.github.com/users/dain/orgs","repos_url":"https://api.github.com/users/dain/repos","events_url":"https://api.github.com/users/dain/events{/privacy}","received_events_url":"https://api.github.com/users/dain/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2016-03-11T04:33:24Z","updated_at":"2016-04-11T09:47:45Z","closed_at":"2016-04-11T09:47:45Z","pull_request":{"url":"https://api.github.com/repos/prestodb/presto/pulls/4755","html_url":"https://github.com/prestodb/presto/pull/4755","diff_url":"https://github.com/prestodb/presto/pull/4755.diff","patch_url":"https://github.com/prestodb/presto/pull/4755.patch"},"body":"When we run a query combined `UNION` and `JOIN` with the `phased_execution` policy, it constantly causes the `IllegalStateException`. The error plan node id keeps changing but the same exception occurs. At the `all-at-once` policy, it doesn't fail.\r\n\r\nI feel like there's race condition or an unexpected condition on the `phased_execution` \r\n\r\nThe query works with this pull request.\r\n```\r\njava.lang.IllegalStateException: noMoreSplits has already been set for 192\r\n\tat com.google.common.base.Preconditions.checkState(Preconditions.java:197)\r\n\tat com.facebook.presto.server.HttpRemoteTask.addSplits(HttpRemoteTask.java:286)\r\n\tat com.facebook.presto.execution.SqlStageExecution.addExchangeLocation(SqlStageExecution.java:203)\r\n\tat com.facebook.presto.execution.scheduler.SqlQueryScheduler$StageLinkage.processScheduleResults(SqlQueryScheduler.java:435)\r\n\tat com.facebook.presto.execution.scheduler.SqlQueryScheduler.schedule(SqlQueryScheduler.java:332)\r\n\tat com.facebook.presto.execution.scheduler.SqlQueryScheduler$$Lambda$1019/1688017528.run(Unknown Source)\r\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\r\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\n```"},"comment":{"url":"https://api.github.com/repos/prestodb/presto/issues/comments/208261160","html_url":"https://github.com/prestodb/presto/pull/4755#issuecomment-208261160","issue_url":"https://api.github.com/repos/prestodb/presto/issues/4755","id":208261160,"user":{"login":"miniway","id":725129,"avatar_url":"https://avatars.githubusercontent.com/u/725129?v=3","gravatar_id":"","url":"https://api.github.com/users/miniway","html_url":"https://github.com/miniway","followers_url":"https://api.github.com/users/miniway/followers","following_url":"https://api.github.com/users/miniway/following{/other_user}","gists_url":"https://api.github.com/users/miniway/gists{/gist_id}","starred_url":"https://api.github.com/users/miniway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miniway/subscriptions","organizations_url":"https://api.github.com/users/miniway/orgs","repos_url":"https://api.github.com/users/miniway/repos","events_url":"https://api.github.com/users/miniway/events{/privacy}","received_events_url":"https://api.github.com/users/miniway/received_events","type":"User","site_admin":false},"created_at":"2016-04-11T09:47:45Z","updated_at":"2016-04-11T09:47:45Z","body":"We're testing presto-0.144 and also reduced number of splits. I haven't tested each condition separately but the error has gone."}}