{"action":"created","comment":{"url":"https://api.github.com/repos/hyrise/hyrise/pulls/comments/199721201","pull_request_review_id":133891174,"id":199721201,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5OTcyMTIwMQ==","diff_hunk":"@@ -164,23 +166,109 @@ TEST_F(SchedulerTest, DiamondDependenciesWithScheduler) {\n }\n \n TEST_F(SchedulerTest, LinearDependenciesWithoutScheduler) {\n+  CurrentScheduler::set(nullptr);\n+\n   std::atomic_uint counter{0u};\n   stress_linear_dependencies(counter);\n   ASSERT_EQ(counter, 3u);\n }\n \n TEST_F(SchedulerTest, MultipleDependenciesWithoutScheduler) {\n+  CurrentScheduler::set(nullptr);\n+\n   std::atomic_uint counter{0u};\n   stress_multiple_dependencies(counter);\n   ASSERT_EQ(counter, 4u);\n }\n \n TEST_F(SchedulerTest, DiamondDependenciesWithoutScheduler) {\n+  CurrentScheduler::set(nullptr);\n+\n   std::atomic_uint counter{0};\n   stress_diamond_dependencies(counter);\n   ASSERT_EQ(counter, 7u);\n }\n \n+TEST_F(SchedulerTest, ExceptionInTaskWithScheduler) {\n+  CurrentScheduler::set(std::make_shared<NodeQueueScheduler>(Topology::create_fake_numa_topology(1, 1)));\n+\n+  std::vector<std::shared_ptr<AbstractTask>> jobs;\n+  for (auto i = 0u; i < ProcessingUnit::MAX_WORKERS_PER_CORE + 5; ++i) {\n+    auto job = std::make_shared<JobTask>([]() { throw InvalidInputException(\"Invalid Input!\"); });\n+    job->schedule();\n+    jobs.emplace_back(job);\n+  }\n+  EXPECT_THROW(CurrentScheduler::wait_for_tasks(jobs), InvalidInputException);\n+\n+  bool is_there_still_a_worker = false;\n+  jobs = {};\n+  auto job = std::make_shared<JobTask>([&]() { is_there_still_a_worker = true; });\n+  job->schedule();\n+  jobs.emplace_back(job);\n+  CurrentScheduler::wait_for_tasks(jobs);\n+  EXPECT_TRUE(is_there_still_a_worker);\n+\n+  CurrentScheduler::get()->finish();\n+}\n+\n+TEST_F(SchedulerTest, ExceptionInTaskWithoutScheduler) {\n+  CurrentScheduler::set(nullptr);\n+\n+  // If we don't have a scheduler, the exception should not get caught.\n+  EXPECT_THROW(\n+      {\n+        std::vector<std::shared_ptr<AbstractTask>> jobs;\n+        for (auto i = 0u; i < 5; ++i) {\n+          auto job = std::make_shared<JobTask>([]() { throw InvalidInputException(\"Something went wrong!\"); });\n+          job->schedule();\n+          jobs.emplace_back(job);\n+        }\n+      },\n+      InvalidInputException);\n+}\n+\n+TEST_F(SchedulerTest, ExceptionInDependentTaskWithScheduler) {\n+  CurrentScheduler::set(std::make_shared<NodeQueueScheduler>(Topology::create_fake_numa_topology(1, 1)));\n+\n+  std::vector<std::shared_ptr<AbstractTask>> jobs;\n+  int step = 0;\n+  jobs.emplace_back(std::make_shared<JobTask>([&]() { step = 1; }));\n+  jobs.emplace_back(std::make_shared<JobTask>([&]() {\n+    step = 2;\n+    throw InvalidInputException(\"Boom\");\n+  }));\n+  jobs.emplace_back(std::make_shared<JobTask>([&]() { step = 3; }));\n+  jobs[0]->set_as_predecessor_of(jobs[1]);\n+  jobs[1]->set_as_predecessor_of(jobs[2]);\n+  jobs[2]->schedule();","path":"src/test/scheduler/scheduler_test.cpp","position":89,"original_position":89,"commit_id":"d4eb66b8445ffcbde79fa681d3dcf5855f2cbc6f","original_commit_id":"d4eb66b8445ffcbde79fa681d3dcf5855f2cbc6f","user":{"login":"mrzzzrm","id":2679018,"node_id":"MDQ6VXNlcjI2NzkwMTg=","avatar_url":"https://avatars3.githubusercontent.com/u/2679018?v=4","gravatar_id":"","url":"https://api.github.com/users/mrzzzrm","html_url":"https://github.com/mrzzzrm","followers_url":"https://api.github.com/users/mrzzzrm/followers","following_url":"https://api.github.com/users/mrzzzrm/following{/other_user}","gists_url":"https://api.github.com/users/mrzzzrm/gists{/gist_id}","starred_url":"https://api.github.com/users/mrzzzrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrzzzrm/subscriptions","organizations_url":"https://api.github.com/users/mrzzzrm/orgs","repos_url":"https://api.github.com/users/mrzzzrm/repos","events_url":"https://api.github.com/users/mrzzzrm/events{/privacy}","received_events_url":"https://api.github.com/users/mrzzzrm/received_events","type":"User","site_admin":false},"body":"again, schedule_and_wait_for_tasks would be shorter","created_at":"2018-07-03T08:20:41Z","updated_at":"2018-07-03T08:48:16Z","html_url":"https://github.com/hyrise/hyrise/pull/896#discussion_r199721201","pull_request_url":"https://api.github.com/repos/hyrise/hyrise/pulls/896","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/hyrise/hyrise/pulls/comments/199721201"},"html":{"href":"https://github.com/hyrise/hyrise/pull/896#discussion_r199721201"},"pull_request":{"href":"https://api.github.com/repos/hyrise/hyrise/pulls/896"}}},"pull_request":{"url":"https://api.github.com/repos/hyrise/hyrise/pulls/896","id":194298404,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0Mjk4NDA0","html_url":"https://github.com/hyrise/hyrise/pull/896","diff_url":"https://github.com/hyrise/hyrise/pull/896.diff","patch_url":"https://github.com/hyrise/hyrise/pull/896.patch","issue_url":"https://api.github.com/repos/hyrise/hyrise/issues/896","number":896,"state":"open","locked":false,"title":"Refactor exception handling","user":{"login":"nilsthamm","id":9497039,"node_id":"MDQ6VXNlcjk0OTcwMzk=","avatar_url":"https://avatars1.githubusercontent.com/u/9497039?v=4","gravatar_id":"","url":"https://api.github.com/users/nilsthamm","html_url":"https://github.com/nilsthamm","followers_url":"https://api.github.com/users/nilsthamm/followers","following_url":"https://api.github.com/users/nilsthamm/following{/other_user}","gists_url":"https://api.github.com/users/nilsthamm/gists{/gist_id}","starred_url":"https://api.github.com/users/nilsthamm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nilsthamm/subscriptions","organizations_url":"https://api.github.com/users/nilsthamm/orgs","repos_url":"https://api.github.com/users/nilsthamm/repos","events_url":"https://api.github.com/users/nilsthamm/events{/privacy}","received_events_url":"https://api.github.com/users/nilsthamm/received_events","type":"User","site_admin":false},"body":"The code changed by this PR will mostly be invalid as soon as #882  is finished. So the changes in the SQLTransaltor are to get feedback on what we want to declare as invalid input and how we want to to the exception handling conceptionally.\r\n\r\n#545 and #830 both required a new way of exception handling.\r\nOn the one hand, exceptions in tasks will now be caught and propagated to the caller that scheduled the task. New is that this now also works when the task got executed in a worker with a scheduler in place. (Mostly changes from [mrks/scheduling-throw](https://github.com/hyrise/hyrise/tree/mrks/scheduling-throw))\r\n\r\nThe Exception InvalidInput is to mark an error that was most likely caused by wrong user input and that will be caught by the console. Therefore it doesn't causes a termination and a rollback of the transaction will be attempted. This also means all other types of exceptions will cause the console to crash\r\n","created_at":"2018-06-12T14:25:33Z","updated_at":"2018-07-03T08:48:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c2498965d3b86ccd4e85a0f1e2311a0d1163db98","assignee":null,"assignees":[],"requested_reviewers":[{"login":"mrks","id":575106,"node_id":"MDQ6VXNlcjU3NTEwNg==","avatar_url":"https://avatars2.githubusercontent.com/u/575106?v=4","gravatar_id":"","url":"https://api.github.com/users/mrks","html_url":"https://github.com/mrks","followers_url":"https://api.github.com/users/mrks/followers","following_url":"https://api.github.com/users/mrks/following{/other_user}","gists_url":"https://api.github.com/users/mrks/gists{/gist_id}","starred_url":"https://api.github.com/users/mrks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrks/subscriptions","organizations_url":"https://api.github.com/users/mrks/orgs","repos_url":"https://api.github.com/users/mrks/repos","events_url":"https://api.github.com/users/mrks/events{/privacy}","received_events_url":"https://api.github.com/users/mrks/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hyrise/hyrise/pulls/896/commits","review_comments_url":"https://api.github.com/repos/hyrise/hyrise/pulls/896/comments","review_comment_url":"https://api.github.com/repos/hyrise/hyrise/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hyrise/hyrise/issues/896/comments","statuses_url":"https://api.github.com/repos/hyrise/hyrise/statuses/d4eb66b8445ffcbde79fa681d3dcf5855f2cbc6f","head":{"label":"hyrise:feature/handle-invalid-inputs","ref":"feature/handle-invalid-inputs","sha":"d4eb66b8445ffcbde79fa681d3dcf5855f2cbc6f","user":{"login":"hyrise","id":3465095,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0NjUwOTU=","avatar_url":"https://avatars2.githubusercontent.com/u/3465095?v=4","gravatar_id":"","url":"https://api.github.com/users/hyrise","html_url":"https://github.com/hyrise","followers_url":"https://api.github.com/users/hyrise/followers","following_url":"https://api.github.com/users/hyrise/following{/other_user}","gists_url":"https://api.github.com/users/hyrise/gists{/gist_id}","starred_url":"https://api.github.com/users/hyrise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyrise/subscriptions","organizations_url":"https://api.github.com/users/hyrise/orgs","repos_url":"https://api.github.com/users/hyrise/repos","events_url":"https://api.github.com/users/hyrise/events{/privacy}","received_events_url":"https://api.github.com/users/hyrise/received_events","type":"Organization","site_admin":false},"repo":{"id":87414843,"node_id":"MDEwOlJlcG9zaXRvcnk4NzQxNDg0Mw==","name":"hyrise","full_name":"hyrise/hyrise","owner":{"login":"hyrise","id":3465095,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0NjUwOTU=","avatar_url":"https://avatars2.githubusercontent.com/u/3465095?v=4","gravatar_id":"","url":"https://api.github.com/users/hyrise","html_url":"https://github.com/hyrise","followers_url":"https://api.github.com/users/hyrise/followers","following_url":"https://api.github.com/users/hyrise/following{/other_user}","gists_url":"https://api.github.com/users/hyrise/gists{/gist_id}","starred_url":"https://api.github.com/users/hyrise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyrise/subscriptions","organizations_url":"https://api.github.com/users/hyrise/orgs","repos_url":"https://api.github.com/users/hyrise/repos","events_url":"https://api.github.com/users/hyrise/events{/privacy}","received_events_url":"https://api.github.com/users/hyrise/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hyrise/hyrise","description":"A research in-memory database.","fork":false,"url":"https://api.github.com/repos/hyrise/hyrise","forks_url":"https://api.github.com/repos/hyrise/hyrise/forks","keys_url":"https://api.github.com/repos/hyrise/hyrise/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hyrise/hyrise/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hyrise/hyrise/teams","hooks_url":"https://api.github.com/repos/hyrise/hyrise/hooks","issue_events_url":"https://api.github.com/repos/hyrise/hyrise/issues/events{/number}","events_url":"https://api.github.com/repos/hyrise/hyrise/events","assignees_url":"https://api.github.com/repos/hyrise/hyrise/assignees{/user}","branches_url":"https://api.github.com/repos/hyrise/hyrise/branches{/branch}","tags_url":"https://api.github.com/repos/hyrise/hyrise/tags","blobs_url":"https://api.github.com/repos/hyrise/hyrise/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hyrise/hyrise/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hyrise/hyrise/git/refs{/sha}","trees_url":"https://api.github.com/repos/hyrise/hyrise/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hyrise/hyrise/statuses/{sha}","languages_url":"https://api.github.com/repos/hyrise/hyrise/languages","stargazers_url":"https://api.github.com/repos/hyrise/hyrise/stargazers","contributors_url":"https://api.github.com/repos/hyrise/hyrise/contributors","subscribers_url":"https://api.github.com/repos/hyrise/hyrise/subscribers","subscription_url":"https://api.github.com/repos/hyrise/hyrise/subscription","commits_url":"https://api.github.com/repos/hyrise/hyrise/commits{/sha}","git_commits_url":"https://api.github.com/repos/hyrise/hyrise/git/commits{/sha}","comments_url":"https://api.github.com/repos/hyrise/hyrise/comments{/number}","issue_comment_url":"https://api.github.com/repos/hyrise/hyrise/issues/comments{/number}","contents_url":"https://api.github.com/repos/hyrise/hyrise/contents/{+path}","compare_url":"https://api.github.com/repos/hyrise/hyrise/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hyrise/hyrise/merges","archive_url":"https://api.github.com/repos/hyrise/hyrise/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hyrise/hyrise/downloads","issues_url":"https://api.github.com/repos/hyrise/hyrise/issues{/number}","pulls_url":"https://api.github.com/repos/hyrise/hyrise/pulls{/number}","milestones_url":"https://api.github.com/repos/hyrise/hyrise/milestones{/number}","notifications_url":"https://api.github.com/repos/hyrise/hyrise/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hyrise/hyrise/labels{/name}","releases_url":"https://api.github.com/repos/hyrise/hyrise/releases{/id}","deployments_url":"https://api.github.com/repos/hyrise/hyrise/deployments","created_at":"2017-04-06T10:03:31Z","updated_at":"2018-07-03T01:53:28Z","pushed_at":"2018-07-03T08:47:33Z","git_url":"git://github.com/hyrise/hyrise.git","ssh_url":"git@github.com:hyrise/hyrise.git","clone_url":"https://github.com/hyrise/hyrise.git","svn_url":"https://github.com/hyrise/hyrise","homepage":"https://hpi.de/plattner/projects/hyrise.html","size":12399,"stargazers_count":84,"watchers_count":84,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"archived":false,"open_issues_count":83,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":23,"open_issues":83,"watchers":84,"default_branch":"master"}},"base":{"label":"hyrise:master","ref":"master","sha":"16d69e9c775292d0b258c46577da5f5a3c4609f0","user":{"login":"hyrise","id":3465095,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0NjUwOTU=","avatar_url":"https://avatars2.githubusercontent.com/u/3465095?v=4","gravatar_id":"","url":"https://api.github.com/users/hyrise","html_url":"https://github.com/hyrise","followers_url":"https://api.github.com/users/hyrise/followers","following_url":"https://api.github.com/users/hyrise/following{/other_user}","gists_url":"https://api.github.com/users/hyrise/gists{/gist_id}","starred_url":"https://api.github.com/users/hyrise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyrise/subscriptions","organizations_url":"https://api.github.com/users/hyrise/orgs","repos_url":"https://api.github.com/users/hyrise/repos","events_url":"https://api.github.com/users/hyrise/events{/privacy}","received_events_url":"https://api.github.com/users/hyrise/received_events","type":"Organization","site_admin":false},"repo":{"id":87414843,"node_id":"MDEwOlJlcG9zaXRvcnk4NzQxNDg0Mw==","name":"hyrise","full_name":"hyrise/hyrise","owner":{"login":"hyrise","id":3465095,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0NjUwOTU=","avatar_url":"https://avatars2.githubusercontent.com/u/3465095?v=4","gravatar_id":"","url":"https://api.github.com/users/hyrise","html_url":"https://github.com/hyrise","followers_url":"https://api.github.com/users/hyrise/followers","following_url":"https://api.github.com/users/hyrise/following{/other_user}","gists_url":"https://api.github.com/users/hyrise/gists{/gist_id}","starred_url":"https://api.github.com/users/hyrise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyrise/subscriptions","organizations_url":"https://api.github.com/users/hyrise/orgs","repos_url":"https://api.github.com/users/hyrise/repos","events_url":"https://api.github.com/users/hyrise/events{/privacy}","received_events_url":"https://api.github.com/users/hyrise/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hyrise/hyrise","description":"A research in-memory database.","fork":false,"url":"https://api.github.com/repos/hyrise/hyrise","forks_url":"https://api.github.com/repos/hyrise/hyrise/forks","keys_url":"https://api.github.com/repos/hyrise/hyrise/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hyrise/hyrise/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hyrise/hyrise/teams","hooks_url":"https://api.github.com/repos/hyrise/hyrise/hooks","issue_events_url":"https://api.github.com/repos/hyrise/hyrise/issues/events{/number}","events_url":"https://api.github.com/repos/hyrise/hyrise/events","assignees_url":"https://api.github.com/repos/hyrise/hyrise/assignees{/user}","branches_url":"https://api.github.com/repos/hyrise/hyrise/branches{/branch}","tags_url":"https://api.github.com/repos/hyrise/hyrise/tags","blobs_url":"https://api.github.com/repos/hyrise/hyrise/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hyrise/hyrise/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hyrise/hyrise/git/refs{/sha}","trees_url":"https://api.github.com/repos/hyrise/hyrise/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hyrise/hyrise/statuses/{sha}","languages_url":"https://api.github.com/repos/hyrise/hyrise/languages","stargazers_url":"https://api.github.com/repos/hyrise/hyrise/stargazers","contributors_url":"https://api.github.com/repos/hyrise/hyrise/contributors","subscribers_url":"https://api.github.com/repos/hyrise/hyrise/subscribers","subscription_url":"https://api.github.com/repos/hyrise/hyrise/subscription","commits_url":"https://api.github.com/repos/hyrise/hyrise/commits{/sha}","git_commits_url":"https://api.github.com/repos/hyrise/hyrise/git/commits{/sha}","comments_url":"https://api.github.com/repos/hyrise/hyrise/comments{/number}","issue_comment_url":"https://api.github.com/repos/hyrise/hyrise/issues/comments{/number}","contents_url":"https://api.github.com/repos/hyrise/hyrise/contents/{+path}","compare_url":"https://api.github.com/repos/hyrise/hyrise/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hyrise/hyrise/merges","archive_url":"https://api.github.com/repos/hyrise/hyrise/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hyrise/hyrise/downloads","issues_url":"https://api.github.com/repos/hyrise/hyrise/issues{/number}","pulls_url":"https://api.github.com/repos/hyrise/hyrise/pulls{/number}","milestones_url":"https://api.github.com/repos/hyrise/hyrise/milestones{/number}","notifications_url":"https://api.github.com/repos/hyrise/hyrise/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hyrise/hyrise/labels{/name}","releases_url":"https://api.github.com/repos/hyrise/hyrise/releases{/id}","deployments_url":"https://api.github.com/repos/hyrise/hyrise/deployments","created_at":"2017-04-06T10:03:31Z","updated_at":"2018-07-03T01:53:28Z","pushed_at":"2018-07-03T08:47:33Z","git_url":"git://github.com/hyrise/hyrise.git","ssh_url":"git@github.com:hyrise/hyrise.git","clone_url":"https://github.com/hyrise/hyrise.git","svn_url":"https://github.com/hyrise/hyrise","homepage":"https://hpi.de/plattner/projects/hyrise.html","size":12399,"stargazers_count":84,"watchers_count":84,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"archived":false,"open_issues_count":83,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":23,"open_issues":83,"watchers":84,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hyrise/hyrise/pulls/896"},"html":{"href":"https://github.com/hyrise/hyrise/pull/896"},"issue":{"href":"https://api.github.com/repos/hyrise/hyrise/issues/896"},"comments":{"href":"https://api.github.com/repos/hyrise/hyrise/issues/896/comments"},"review_comments":{"href":"https://api.github.com/repos/hyrise/hyrise/pulls/896/comments"},"review_comment":{"href":"https://api.github.com/repos/hyrise/hyrise/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hyrise/hyrise/pulls/896/commits"},"statuses":{"href":"https://api.github.com/repos/hyrise/hyrise/statuses/d4eb66b8445ffcbde79fa681d3dcf5855f2cbc6f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mrzzzrm"}}