{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/sonic-swss/pulls/comments/205869453","pull_request_review_id":141227954,"id":205869453,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTg2OTQ1Mw==","diff_hunk":"@@ -1177,6 +1180,64 @@ bool PortsOrch::initPort(const string &alias, const set<int> &lane_set)\n     return true;\n }\n \n+bool PortsOrch::bake()\n+{\n+    SWSS_LOG_ENTER();\n+\n+    // Check the APP_DB port table for warm reboot\n+    vector<FieldValueTuple> tuples;\n+    bool foundPortConfigDone = m_portTable->get(\"PortConfigDone\", tuples);\n+    SWSS_LOG_NOTICE(\"foundPortConfigDone = %d\", foundPortConfigDone);\n+\n+    bool foundPortInitDone = m_portTable->get(\"PortInitDone\", tuples);\n+    SWSS_LOG_NOTICE(\"foundPortInitDone = %d\", foundPortInitDone);\n+\n+    vector<string> keys;\n+    m_portTable->getKeys(keys);\n+    SWSS_LOG_NOTICE(\"m_portTable->getKeys %zd\", keys.size());\n+\n+    if (!foundPortConfigDone || !foundPortInitDone)\n+    {\n+        SWSS_LOG_NOTICE(\"No port table, fallback to cold start\");\n+        cleanPortTable(keys);","path":"orchagent/portsorch.cpp","position":33,"original_position":33,"commit_id":"d36326228a318da7667e33481414af7e18481fc8","original_commit_id":"d36326228a318da7667e33481414af7e18481fc8","user":{"login":"jipanyang","id":29779499,"node_id":"MDQ6VXNlcjI5Nzc5NDk5","avatar_url":"https://avatars3.githubusercontent.com/u/29779499?v=4","gravatar_id":"","url":"https://api.github.com/users/jipanyang","html_url":"https://github.com/jipanyang","followers_url":"https://api.github.com/users/jipanyang/followers","following_url":"https://api.github.com/users/jipanyang/following{/other_user}","gists_url":"https://api.github.com/users/jipanyang/gists{/gist_id}","starred_url":"https://api.github.com/users/jipanyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jipanyang/subscriptions","organizations_url":"https://api.github.com/users/jipanyang/orgs","repos_url":"https://api.github.com/users/jipanyang/repos","events_url":"https://api.github.com/users/jipanyang/events{/privacy}","received_events_url":"https://api.github.com/users/jipanyang/received_events","type":"User","site_admin":false},"body":"There is #547 to have common function for all swss processes to check whether a process is doing warm start . \r\nWe agreed to discuss the schema design.  The basic idea there is to assume that for cold start, the corresponding WARM_RESTART_TABLE entry cleared, then we create the entry and set restart_count to 0.\r\nEvery time the process is warm restarted, restart_count is incremented by 1.   \r\n\r\nNot sure about the purpose of cleanPortTable() here.\r\n\r\n","created_at":"2018-07-27T18:56:16Z","updated_at":"2018-07-27T19:02:39Z","html_url":"https://github.com/Azure/sonic-swss/pull/551#discussion_r205869453","pull_request_url":"https://api.github.com/repos/Azure/sonic-swss/pulls/551","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Azure/sonic-swss/pulls/comments/205869453"},"html":{"href":"https://github.com/Azure/sonic-swss/pull/551#discussion_r205869453"},"pull_request":{"href":"https://api.github.com/repos/Azure/sonic-swss/pulls/551"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/sonic-swss/pulls/551","id":204314959,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0MzE0OTU5","html_url":"https://github.com/Azure/sonic-swss/pull/551","diff_url":"https://github.com/Azure/sonic-swss/pull/551.diff","patch_url":"https://github.com/Azure/sonic-swss/pull/551.patch","issue_url":"https://api.github.com/repos/Azure/sonic-swss/issues/551","number":551,"state":"open","locked":false,"title":"Warm reboot for PortsOrch","user":{"login":"qiluo-msft","id":11406616,"node_id":"MDQ6VXNlcjExNDA2NjE2","avatar_url":"https://avatars1.githubusercontent.com/u/11406616?v=4","gravatar_id":"","url":"https://api.github.com/users/qiluo-msft","html_url":"https://github.com/qiluo-msft","followers_url":"https://api.github.com/users/qiluo-msft/followers","following_url":"https://api.github.com/users/qiluo-msft/following{/other_user}","gists_url":"https://api.github.com/users/qiluo-msft/gists{/gist_id}","starred_url":"https://api.github.com/users/qiluo-msft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qiluo-msft/subscriptions","organizations_url":"https://api.github.com/users/qiluo-msft/orgs","repos_url":"https://api.github.com/users/qiluo-msft/repos","events_url":"https://api.github.com/users/qiluo-msft/events{/privacy}","received_events_url":"https://api.github.com/users/qiluo-msft/received_events","type":"User","site_admin":false},"body":"The non-warm reboot behavior is backward compatible, and tested in lab.","created_at":"2018-07-27T02:38:20Z","updated_at":"2018-07-27T19:02:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6a9f7d2ac51041dc61fa10c70ee3a6a15be16964","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/sonic-swss/pulls/551/commits","review_comments_url":"https://api.github.com/repos/Azure/sonic-swss/pulls/551/comments","review_comment_url":"https://api.github.com/repos/Azure/sonic-swss/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/sonic-swss/issues/551/comments","statuses_url":"https://api.github.com/repos/Azure/sonic-swss/statuses/d36326228a318da7667e33481414af7e18481fc8","head":{"label":"qiluo-msft:qiluo/warmport","ref":"qiluo/warmport","sha":"d36326228a318da7667e33481414af7e18481fc8","user":{"login":"qiluo-msft","id":11406616,"node_id":"MDQ6VXNlcjExNDA2NjE2","avatar_url":"https://avatars1.githubusercontent.com/u/11406616?v=4","gravatar_id":"","url":"https://api.github.com/users/qiluo-msft","html_url":"https://github.com/qiluo-msft","followers_url":"https://api.github.com/users/qiluo-msft/followers","following_url":"https://api.github.com/users/qiluo-msft/following{/other_user}","gists_url":"https://api.github.com/users/qiluo-msft/gists{/gist_id}","starred_url":"https://api.github.com/users/qiluo-msft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qiluo-msft/subscriptions","organizations_url":"https://api.github.com/users/qiluo-msft/orgs","repos_url":"https://api.github.com/users/qiluo-msft/repos","events_url":"https://api.github.com/users/qiluo-msft/events{/privacy}","received_events_url":"https://api.github.com/users/qiluo-msft/received_events","type":"User","site_admin":false},"repo":{"id":66880363,"node_id":"MDEwOlJlcG9zaXRvcnk2Njg4MDM2Mw==","name":"sonic-swss","full_name":"qiluo-msft/sonic-swss","owner":{"login":"qiluo-msft","id":11406616,"node_id":"MDQ6VXNlcjExNDA2NjE2","avatar_url":"https://avatars1.githubusercontent.com/u/11406616?v=4","gravatar_id":"","url":"https://api.github.com/users/qiluo-msft","html_url":"https://github.com/qiluo-msft","followers_url":"https://api.github.com/users/qiluo-msft/followers","following_url":"https://api.github.com/users/qiluo-msft/following{/other_user}","gists_url":"https://api.github.com/users/qiluo-msft/gists{/gist_id}","starred_url":"https://api.github.com/users/qiluo-msft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qiluo-msft/subscriptions","organizations_url":"https://api.github.com/users/qiluo-msft/orgs","repos_url":"https://api.github.com/users/qiluo-msft/repos","events_url":"https://api.github.com/users/qiluo-msft/events{/privacy}","received_events_url":"https://api.github.com/users/qiluo-msft/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/qiluo-msft/sonic-swss","description":"SONiC Switch State Service (SWSS)","fork":true,"url":"https://api.github.com/repos/qiluo-msft/sonic-swss","forks_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/forks","keys_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/keys{/key_id}","collaborators_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/teams","hooks_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/hooks","issue_events_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/issues/events{/number}","events_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/events","assignees_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/assignees{/user}","branches_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/branches{/branch}","tags_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/tags","blobs_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/git/refs{/sha}","trees_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/git/trees{/sha}","statuses_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/statuses/{sha}","languages_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/languages","stargazers_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/stargazers","contributors_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/contributors","subscribers_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/subscribers","subscription_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/subscription","commits_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/commits{/sha}","git_commits_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/git/commits{/sha}","comments_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/comments{/number}","issue_comment_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/issues/comments{/number}","contents_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/contents/{+path}","compare_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/compare/{base}...{head}","merges_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/merges","archive_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/downloads","issues_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/issues{/number}","pulls_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/pulls{/number}","milestones_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/milestones{/number}","notifications_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/labels{/name}","releases_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/releases{/id}","deployments_url":"https://api.github.com/repos/qiluo-msft/sonic-swss/deployments","created_at":"2016-08-29T21:02:44Z","updated_at":"2018-07-18T23:21:03Z","pushed_at":"2018-07-27T02:36:49Z","git_url":"git://github.com/qiluo-msft/sonic-swss.git","ssh_url":"git@github.com:qiluo-msft/sonic-swss.git","clone_url":"https://github.com/qiluo-msft/sonic-swss.git","svn_url":"https://github.com/qiluo-msft/sonic-swss","homepage":"https://azure.github.io/SONiC","size":1718,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Azure:master","ref":"master","sha":"902239ad4c67c8e85da296b00badbc08b9820001","user":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":53515475,"node_id":"MDEwOlJlcG9zaXRvcnk1MzUxNTQ3NQ==","name":"sonic-swss","full_name":"Azure/sonic-swss","owner":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/sonic-swss","description":"SONiC Switch State Service (SwSS)","fork":false,"url":"https://api.github.com/repos/Azure/sonic-swss","forks_url":"https://api.github.com/repos/Azure/sonic-swss/forks","keys_url":"https://api.github.com/repos/Azure/sonic-swss/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/sonic-swss/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/sonic-swss/teams","hooks_url":"https://api.github.com/repos/Azure/sonic-swss/hooks","issue_events_url":"https://api.github.com/repos/Azure/sonic-swss/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/sonic-swss/events","assignees_url":"https://api.github.com/repos/Azure/sonic-swss/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/sonic-swss/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/sonic-swss/tags","blobs_url":"https://api.github.com/repos/Azure/sonic-swss/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/sonic-swss/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/sonic-swss/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/sonic-swss/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/sonic-swss/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/sonic-swss/languages","stargazers_url":"https://api.github.com/repos/Azure/sonic-swss/stargazers","contributors_url":"https://api.github.com/repos/Azure/sonic-swss/contributors","subscribers_url":"https://api.github.com/repos/Azure/sonic-swss/subscribers","subscription_url":"https://api.github.com/repos/Azure/sonic-swss/subscription","commits_url":"https://api.github.com/repos/Azure/sonic-swss/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/sonic-swss/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/sonic-swss/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/sonic-swss/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/sonic-swss/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/sonic-swss/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/sonic-swss/merges","archive_url":"https://api.github.com/repos/Azure/sonic-swss/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/sonic-swss/downloads","issues_url":"https://api.github.com/repos/Azure/sonic-swss/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/sonic-swss/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/sonic-swss/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/sonic-swss/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/sonic-swss/labels{/name}","releases_url":"https://api.github.com/repos/Azure/sonic-swss/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/sonic-swss/deployments","created_at":"2016-03-09T17:01:09Z","updated_at":"2018-07-26T21:07:29Z","pushed_at":"2018-07-27T18:38:09Z","git_url":"git://github.com/Azure/sonic-swss.git","ssh_url":"git@github.com:Azure/sonic-swss.git","clone_url":"https://github.com/Azure/sonic-swss.git","svn_url":"https://github.com/Azure/sonic-swss","homepage":"https://azure.github.io/SONiC","size":1651,"stargazers_count":34,"watchers_count":34,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":59,"mirror_url":null,"archived":false,"open_issues_count":57,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":59,"open_issues":57,"watchers":34,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/sonic-swss/pulls/551"},"html":{"href":"https://github.com/Azure/sonic-swss/pull/551"},"issue":{"href":"https://api.github.com/repos/Azure/sonic-swss/issues/551"},"comments":{"href":"https://api.github.com/repos/Azure/sonic-swss/issues/551/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/sonic-swss/pulls/551/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/sonic-swss/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/sonic-swss/pulls/551/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/sonic-swss/statuses/d36326228a318da7667e33481414af7e18481fc8"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"jipanyang"}}