{"action":"created","comment":{"url":"https://api.github.com/repos/kaltura/server/pulls/comments/54405301","id":54405301,"diff_hunk":"@@ -357,40 +387,42 @@ private function createRecordedEntry(LiveEntry $dbEntry, $mediaServerIndex)\n \t * @action unregisterMediaServer\n \t * @param string $entryId Live entry id\n \t * @param string $hostname Media server host name\n-\t * @param KalturaMediaServerIndex $mediaServerIndex Media server index primary / secondary\n+\t * @param KalturaEntryServerNodeType $mediaServerIndex Media server index primary / secondary\n \t * @return KalturaLiveEntry The updated live entry\n \t *\n \t * @throws KalturaErrors::ENTRY_ID_NOT_FOUND\n-\t * @throws KalturaErrors::MEDIA_SERVER_NOT_FOUND\n+\t * @throws KalturaErrors::SERVER_NODE_NOT_FOUND\n+\t * @throws KalturaErrors::ENTRY_SERVER_NODE_MULTI_RESULT\n \t */\n \tfunction unregisterMediaServerAction($entryId, $hostname, $mediaServerIndex)\n \t{\n-\t\t$this->dumpApiRequest($entryId);\n \t\tKalturaLog::debug(\"Entry [$entryId] from mediaServerIndex [$mediaServerIndex] with hostname [$hostname]\");\n-\n-\t\t$dbEntry = entryPeer::retrieveByPK($entryId);\n-\t\tif (!$dbEntry || !($dbEntry instanceof LiveEntry))\n+\t\t/* @var $dbLiveEntry LiveEntry */\n+\t\t$dbLiveEntry = entryPeer::retrieveByPK($entryId);\n+\t\tif (!$dbLiveEntry || !($dbLiveEntry instanceof LiveEntry))\n \t\t\tthrow new KalturaAPIException(KalturaErrors::ENTRY_ID_NOT_FOUND, $entryId);\n \n-\t\t$dbEntry->unsetMediaServer($mediaServerIndex, $hostname);\n+\t\t$dbLiveEntry->unsetMediaServer($mediaServerIndex);","path":"api_v3/lib/KalturaLiveEntryService.php","position":178,"original_position":178,"commit_id":"bc4f8e9baf1427b95c93b8483fe16595831d5b12","original_commit_id":"bc4f8e9baf1427b95c93b8483fe16595831d5b12","user":{"login":"yossipapi","id":4889668,"avatar_url":"https://avatars.githubusercontent.com/u/4889668?v=3","gravatar_id":"","url":"https://api.github.com/users/yossipapi","html_url":"https://github.com/yossipapi","followers_url":"https://api.github.com/users/yossipapi/followers","following_url":"https://api.github.com/users/yossipapi/following{/other_user}","gists_url":"https://api.github.com/users/yossipapi/gists{/gist_id}","starred_url":"https://api.github.com/users/yossipapi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yossipapi/subscriptions","organizations_url":"https://api.github.com/users/yossipapi/orgs","repos_url":"https://api.github.com/users/yossipapi/repos","events_url":"https://api.github.com/users/yossipapi/events{/privacy}","received_events_url":"https://api.github.com/users/yossipapi/received_events","type":"User","site_admin":false},"body":"The logic below is wrong ... will cause:\r\n1. setRedirectEntryId will never be called.\r\n2. setCurrentBroadcastStartTime will never be reset.\r\n\r\nYou need to check if count(entryServerNodes) by entry id is 0 than do the previous logic else same logic as before. ","created_at":"2016-02-29T12:51:11Z","updated_at":"2016-02-29T12:51:11Z","html_url":"https://github.com/kaltura/server/pull/3882#discussion_r54405301","pull_request_url":"https://api.github.com/repos/kaltura/server/pulls/3882","_links":{"self":{"href":"https://api.github.com/repos/kaltura/server/pulls/comments/54405301"},"html":{"href":"https://github.com/kaltura/server/pull/3882#discussion_r54405301"},"pull_request":{"href":"https://api.github.com/repos/kaltura/server/pulls/3882"}}},"pull_request":{"url":"https://api.github.com/repos/kaltura/server/pulls/3882","id":60690738,"html_url":"https://github.com/kaltura/server/pull/3882","diff_url":"https://github.com/kaltura/server/pull/3882.diff","patch_url":"https://github.com/kaltura/server/pull/3882.patch","issue_url":"https://api.github.com/repos/kaltura/server/issues/3882","number":3882,"state":"open","locked":false,"title":"Kajam 11.9.0 entry server node","user":{"login":"EladCohenKaltura","id":10695719,"avatar_url":"https://avatars.githubusercontent.com/u/10695719?v=3","gravatar_id":"","url":"https://api.github.com/users/EladCohenKaltura","html_url":"https://github.com/EladCohenKaltura","followers_url":"https://api.github.com/users/EladCohenKaltura/followers","following_url":"https://api.github.com/users/EladCohenKaltura/following{/other_user}","gists_url":"https://api.github.com/users/EladCohenKaltura/gists{/gist_id}","starred_url":"https://api.github.com/users/EladCohenKaltura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EladCohenKaltura/subscriptions","organizations_url":"https://api.github.com/users/EladCohenKaltura/orgs","repos_url":"https://api.github.com/users/EladCohenKaltura/repos","events_url":"https://api.github.com/users/EladCohenKaltura/events{/privacy}","received_events_url":"https://api.github.com/users/EladCohenKaltura/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-25T14:56:34Z","updated_at":"2016-02-29T12:51:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"befeec15e5f589f6a3c4b3d653ef661aa68e0174","assignee":{"login":"yossipapi","id":4889668,"avatar_url":"https://avatars.githubusercontent.com/u/4889668?v=3","gravatar_id":"","url":"https://api.github.com/users/yossipapi","html_url":"https://github.com/yossipapi","followers_url":"https://api.github.com/users/yossipapi/followers","following_url":"https://api.github.com/users/yossipapi/following{/other_user}","gists_url":"https://api.github.com/users/yossipapi/gists{/gist_id}","starred_url":"https://api.github.com/users/yossipapi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yossipapi/subscriptions","organizations_url":"https://api.github.com/users/yossipapi/orgs","repos_url":"https://api.github.com/users/yossipapi/repos","events_url":"https://api.github.com/users/yossipapi/events{/privacy}","received_events_url":"https://api.github.com/users/yossipapi/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kaltura/server/pulls/3882/commits","review_comments_url":"https://api.github.com/repos/kaltura/server/pulls/3882/comments","review_comment_url":"https://api.github.com/repos/kaltura/server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kaltura/server/issues/3882/comments","statuses_url":"https://api.github.com/repos/kaltura/server/statuses/bc4f8e9baf1427b95c93b8483fe16595831d5b12","head":{"label":"kaltura:Kajam-11.9.0-EntryServerNode","ref":"Kajam-11.9.0-EntryServerNode","sha":"bc4f8e9baf1427b95c93b8483fe16595831d5b12","user":{"login":"kaltura","id":319096,"avatar_url":"https://avatars.githubusercontent.com/u/319096?v=3","gravatar_id":"","url":"https://api.github.com/users/kaltura","html_url":"https://github.com/kaltura","followers_url":"https://api.github.com/users/kaltura/followers","following_url":"https://api.github.com/users/kaltura/following{/other_user}","gists_url":"https://api.github.com/users/kaltura/gists{/gist_id}","starred_url":"https://api.github.com/users/kaltura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaltura/subscriptions","organizations_url":"https://api.github.com/users/kaltura/orgs","repos_url":"https://api.github.com/users/kaltura/repos","events_url":"https://api.github.com/users/kaltura/events{/privacy}","received_events_url":"https://api.github.com/users/kaltura/received_events","type":"Organization","site_admin":false},"repo":{"id":11364783,"name":"server","full_name":"kaltura/server","owner":{"login":"kaltura","id":319096,"avatar_url":"https://avatars.githubusercontent.com/u/319096?v=3","gravatar_id":"","url":"https://api.github.com/users/kaltura","html_url":"https://github.com/kaltura","followers_url":"https://api.github.com/users/kaltura/followers","following_url":"https://api.github.com/users/kaltura/following{/other_user}","gists_url":"https://api.github.com/users/kaltura/gists{/gist_id}","starred_url":"https://api.github.com/users/kaltura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaltura/subscriptions","organizations_url":"https://api.github.com/users/kaltura/orgs","repos_url":"https://api.github.com/users/kaltura/repos","events_url":"https://api.github.com/users/kaltura/events{/privacy}","received_events_url":"https://api.github.com/users/kaltura/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kaltura/server","description":"The official Kaltura server. ","fork":false,"url":"https://api.github.com/repos/kaltura/server","forks_url":"https://api.github.com/repos/kaltura/server/forks","keys_url":"https://api.github.com/repos/kaltura/server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaltura/server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaltura/server/teams","hooks_url":"https://api.github.com/repos/kaltura/server/hooks","issue_events_url":"https://api.github.com/repos/kaltura/server/issues/events{/number}","events_url":"https://api.github.com/repos/kaltura/server/events","assignees_url":"https://api.github.com/repos/kaltura/server/assignees{/user}","branches_url":"https://api.github.com/repos/kaltura/server/branches{/branch}","tags_url":"https://api.github.com/repos/kaltura/server/tags","blobs_url":"https://api.github.com/repos/kaltura/server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaltura/server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaltura/server/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaltura/server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaltura/server/statuses/{sha}","languages_url":"https://api.github.com/repos/kaltura/server/languages","stargazers_url":"https://api.github.com/repos/kaltura/server/stargazers","contributors_url":"https://api.github.com/repos/kaltura/server/contributors","subscribers_url":"https://api.github.com/repos/kaltura/server/subscribers","subscription_url":"https://api.github.com/repos/kaltura/server/subscription","commits_url":"https://api.github.com/repos/kaltura/server/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaltura/server/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaltura/server/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaltura/server/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaltura/server/contents/{+path}","compare_url":"https://api.github.com/repos/kaltura/server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaltura/server/merges","archive_url":"https://api.github.com/repos/kaltura/server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaltura/server/downloads","issues_url":"https://api.github.com/repos/kaltura/server/issues{/number}","pulls_url":"https://api.github.com/repos/kaltura/server/pulls{/number}","milestones_url":"https://api.github.com/repos/kaltura/server/milestones{/number}","notifications_url":"https://api.github.com/repos/kaltura/server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaltura/server/labels{/name}","releases_url":"https://api.github.com/repos/kaltura/server/releases{/id}","deployments_url":"https://api.github.com/repos/kaltura/server/deployments","created_at":"2013-07-12T08:59:26Z","updated_at":"2016-02-22T16:10:27Z","pushed_at":"2016-02-29T12:18:19Z","git_url":"git://github.com/kaltura/server.git","ssh_url":"git@github.com:kaltura/server.git","clone_url":"https://github.com/kaltura/server.git","svn_url":"https://github.com/kaltura/server","homepage":"http://www.kaltura.org","size":228941,"stargazers_count":80,"watchers_count":80,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":86,"mirror_url":null,"open_issues_count":68,"forks":86,"open_issues":68,"watchers":80,"default_branch":"Kajam-11.10.0"}},"base":{"label":"kaltura:Kajam-11.9.0","ref":"Kajam-11.9.0","sha":"5f1b4d09c2ca630b6fdf0ef0c4c03e3a4d2040a9","user":{"login":"kaltura","id":319096,"avatar_url":"https://avatars.githubusercontent.com/u/319096?v=3","gravatar_id":"","url":"https://api.github.com/users/kaltura","html_url":"https://github.com/kaltura","followers_url":"https://api.github.com/users/kaltura/followers","following_url":"https://api.github.com/users/kaltura/following{/other_user}","gists_url":"https://api.github.com/users/kaltura/gists{/gist_id}","starred_url":"https://api.github.com/users/kaltura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaltura/subscriptions","organizations_url":"https://api.github.com/users/kaltura/orgs","repos_url":"https://api.github.com/users/kaltura/repos","events_url":"https://api.github.com/users/kaltura/events{/privacy}","received_events_url":"https://api.github.com/users/kaltura/received_events","type":"Organization","site_admin":false},"repo":{"id":11364783,"name":"server","full_name":"kaltura/server","owner":{"login":"kaltura","id":319096,"avatar_url":"https://avatars.githubusercontent.com/u/319096?v=3","gravatar_id":"","url":"https://api.github.com/users/kaltura","html_url":"https://github.com/kaltura","followers_url":"https://api.github.com/users/kaltura/followers","following_url":"https://api.github.com/users/kaltura/following{/other_user}","gists_url":"https://api.github.com/users/kaltura/gists{/gist_id}","starred_url":"https://api.github.com/users/kaltura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaltura/subscriptions","organizations_url":"https://api.github.com/users/kaltura/orgs","repos_url":"https://api.github.com/users/kaltura/repos","events_url":"https://api.github.com/users/kaltura/events{/privacy}","received_events_url":"https://api.github.com/users/kaltura/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kaltura/server","description":"The official Kaltura server. ","fork":false,"url":"https://api.github.com/repos/kaltura/server","forks_url":"https://api.github.com/repos/kaltura/server/forks","keys_url":"https://api.github.com/repos/kaltura/server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaltura/server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaltura/server/teams","hooks_url":"https://api.github.com/repos/kaltura/server/hooks","issue_events_url":"https://api.github.com/repos/kaltura/server/issues/events{/number}","events_url":"https://api.github.com/repos/kaltura/server/events","assignees_url":"https://api.github.com/repos/kaltura/server/assignees{/user}","branches_url":"https://api.github.com/repos/kaltura/server/branches{/branch}","tags_url":"https://api.github.com/repos/kaltura/server/tags","blobs_url":"https://api.github.com/repos/kaltura/server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaltura/server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaltura/server/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaltura/server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaltura/server/statuses/{sha}","languages_url":"https://api.github.com/repos/kaltura/server/languages","stargazers_url":"https://api.github.com/repos/kaltura/server/stargazers","contributors_url":"https://api.github.com/repos/kaltura/server/contributors","subscribers_url":"https://api.github.com/repos/kaltura/server/subscribers","subscription_url":"https://api.github.com/repos/kaltura/server/subscription","commits_url":"https://api.github.com/repos/kaltura/server/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaltura/server/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaltura/server/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaltura/server/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaltura/server/contents/{+path}","compare_url":"https://api.github.com/repos/kaltura/server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaltura/server/merges","archive_url":"https://api.github.com/repos/kaltura/server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaltura/server/downloads","issues_url":"https://api.github.com/repos/kaltura/server/issues{/number}","pulls_url":"https://api.github.com/repos/kaltura/server/pulls{/number}","milestones_url":"https://api.github.com/repos/kaltura/server/milestones{/number}","notifications_url":"https://api.github.com/repos/kaltura/server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaltura/server/labels{/name}","releases_url":"https://api.github.com/repos/kaltura/server/releases{/id}","deployments_url":"https://api.github.com/repos/kaltura/server/deployments","created_at":"2013-07-12T08:59:26Z","updated_at":"2016-02-22T16:10:27Z","pushed_at":"2016-02-29T12:18:19Z","git_url":"git://github.com/kaltura/server.git","ssh_url":"git@github.com:kaltura/server.git","clone_url":"https://github.com/kaltura/server.git","svn_url":"https://github.com/kaltura/server","homepage":"http://www.kaltura.org","size":228941,"stargazers_count":80,"watchers_count":80,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":86,"mirror_url":null,"open_issues_count":68,"forks":86,"open_issues":68,"watchers":80,"default_branch":"Kajam-11.10.0"}},"_links":{"self":{"href":"https://api.github.com/repos/kaltura/server/pulls/3882"},"html":{"href":"https://github.com/kaltura/server/pull/3882"},"issue":{"href":"https://api.github.com/repos/kaltura/server/issues/3882"},"comments":{"href":"https://api.github.com/repos/kaltura/server/issues/3882/comments"},"review_comments":{"href":"https://api.github.com/repos/kaltura/server/pulls/3882/comments"},"review_comment":{"href":"https://api.github.com/repos/kaltura/server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kaltura/server/pulls/3882/commits"},"statuses":{"href":"https://api.github.com/repos/kaltura/server/statuses/bc4f8e9baf1427b95c93b8483fe16595831d5b12"}}}}