{"action":"created","comment":{"url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/pulls/comments/91700243","pull_request_review_id":12210707,"id":91700243,"diff_hunk":"@@ -574,7 +574,22 @@ add_stored_events_to_builders (EmerDaemon        *self,\n                                 &num_variants, token, &error);\n   if (!read_succeeded)\n     {\n-      g_warning (\"Could not read from persistent cache: %s.\", error->message);\n+      if (error->domain == G_IO_ERROR && error->code == G_IO_ERROR_INVALID_DATA)","path":"daemon/emer-daemon.c","position":5,"original_position":5,"commit_id":"73fdbceb45074e515992a4f51e921ff053f76cbf","original_commit_id":"643446dc320556d3f90da6b6579272805bcedc9c","user":{"login":"mariospr","id":2197259,"avatar_url":"https://avatars.githubusercontent.com/u/2197259?v=3","gravatar_id":"","url":"https://api.github.com/users/mariospr","html_url":"https://github.com/mariospr","followers_url":"https://api.github.com/users/mariospr/followers","following_url":"https://api.github.com/users/mariospr/following{/other_user}","gists_url":"https://api.github.com/users/mariospr/gists{/gist_id}","starred_url":"https://api.github.com/users/mariospr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariospr/subscriptions","organizations_url":"https://api.github.com/users/mariospr/orgs","repos_url":"https://api.github.com/users/mariospr/repos","events_url":"https://api.github.com/users/mariospr/events{/privacy}","received_events_url":"https://api.github.com/users/mariospr/received_events","type":"User","site_admin":false},"body":"Ok","created_at":"2016-12-09T11:22:03Z","updated_at":"2016-12-09T11:22:03Z","html_url":"https://github.com/endlessm/eos-event-recorder-daemon/pull/214#discussion_r91700243","pull_request_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/pulls/214","_links":{"self":{"href":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/pulls/comments/91700243"},"html":{"href":"https://github.com/endlessm/eos-event-recorder-daemon/pull/214#discussion_r91700243"},"pull_request":{"href":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/pulls/214"}}},"pull_request":{"url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/pulls/214","id":96962656,"html_url":"https://github.com/endlessm/eos-event-recorder-daemon/pull/214","diff_url":"https://github.com/endlessm/eos-event-recorder-daemon/pull/214.diff","patch_url":"https://github.com/endlessm/eos-event-recorder-daemon/pull/214.patch","issue_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/issues/214","number":214,"state":"open","locked":false,"title":"Gracefully handle invalid/corrupt data in the persistent cache","user":{"login":"mariospr","id":2197259,"avatar_url":"https://avatars.githubusercontent.com/u/2197259?v=3","gravatar_id":"","url":"https://api.github.com/users/mariospr","html_url":"https://github.com/mariospr","followers_url":"https://api.github.com/users/mariospr/followers","following_url":"https://api.github.com/users/mariospr/following{/other_user}","gists_url":"https://api.github.com/users/mariospr/gists{/gist_id}","starred_url":"https://api.github.com/users/mariospr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariospr/subscriptions","organizations_url":"https://api.github.com/users/mariospr/orgs","repos_url":"https://api.github.com/users/mariospr/repos","events_url":"https://api.github.com/users/mariospr/events{/privacy}","received_events_url":"https://api.github.com/users/mariospr/received_events","type":"User","site_admin":false},"body":"This patch set improves the way we deal with situations where invalid/corrupt data makes it to the persistent cache file in two ways:\r\n  * Discard invalid data found after a valid chunk when reading from the cache, and just report that.\r\n  * Purge the whole persistent cache file in cases where the corruption can't be detected earlier.\r\n\r\nNote that is still unclear to me how we actually ended up in this scenario, which is still the big question here, but these changes should at least prevent the daemon from crashing and make it able to keep recording and sending metrics after having detected and deal with these kind of situations.\r\n\r\nhttps://phabricator.endlessm.com/T12739","created_at":"2016-12-07T16:52:01Z","updated_at":"2016-12-09T11:22:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"92f12860258dc3e664f8372c1549cb2539f043b4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/pulls/214/commits","review_comments_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/pulls/214/comments","review_comment_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/issues/214/comments","statuses_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/statuses/73fdbceb45074e515992a4f51e921ff053f76cbf","head":{"label":"endlessm:T12739","ref":"T12739","sha":"73fdbceb45074e515992a4f51e921ff053f76cbf","user":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars.githubusercontent.com/u/1930958?v=3","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"repo":{"id":13224558,"name":"eos-event-recorder-daemon","full_name":"endlessm/eos-event-recorder-daemon","owner":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars.githubusercontent.com/u/1930958?v=3","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/endlessm/eos-event-recorder-daemon","description":"Saves recorded user metrics and transmits them in small batches when there's an internet connection","fork":false,"url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon","forks_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/forks","keys_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/teams","hooks_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/hooks","issue_events_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/issues/events{/number}","events_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/events","assignees_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/assignees{/user}","branches_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/branches{/branch}","tags_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/tags","blobs_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/git/refs{/sha}","trees_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/statuses/{sha}","languages_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/languages","stargazers_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/stargazers","contributors_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/contributors","subscribers_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/subscribers","subscription_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/subscription","commits_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/commits{/sha}","git_commits_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/git/commits{/sha}","comments_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/comments{/number}","issue_comment_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/issues/comments{/number}","contents_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/contents/{+path}","compare_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/merges","archive_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/downloads","issues_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/issues{/number}","pulls_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/pulls{/number}","milestones_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/milestones{/number}","notifications_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/labels{/name}","releases_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/releases{/id}","deployments_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/deployments","created_at":"2013-09-30T19:14:11Z","updated_at":"2016-01-15T17:59:34Z","pushed_at":"2016-12-07T23:34:00Z","git_url":"git://github.com/endlessm/eos-event-recorder-daemon.git","ssh_url":"git@github.com:endlessm/eos-event-recorder-daemon.git","clone_url":"https://github.com/endlessm/eos-event-recorder-daemon.git","svn_url":"https://github.com/endlessm/eos-event-recorder-daemon","homepage":"","size":1243,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"endlessm:master","ref":"master","sha":"49ddeb94a1a46024f758a933cda765f88c9c1d96","user":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars.githubusercontent.com/u/1930958?v=3","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"repo":{"id":13224558,"name":"eos-event-recorder-daemon","full_name":"endlessm/eos-event-recorder-daemon","owner":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars.githubusercontent.com/u/1930958?v=3","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/endlessm/eos-event-recorder-daemon","description":"Saves recorded user metrics and transmits them in small batches when there's an internet connection","fork":false,"url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon","forks_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/forks","keys_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/teams","hooks_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/hooks","issue_events_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/issues/events{/number}","events_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/events","assignees_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/assignees{/user}","branches_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/branches{/branch}","tags_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/tags","blobs_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/git/refs{/sha}","trees_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/statuses/{sha}","languages_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/languages","stargazers_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/stargazers","contributors_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/contributors","subscribers_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/subscribers","subscription_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/subscription","commits_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/commits{/sha}","git_commits_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/git/commits{/sha}","comments_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/comments{/number}","issue_comment_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/issues/comments{/number}","contents_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/contents/{+path}","compare_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/merges","archive_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/downloads","issues_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/issues{/number}","pulls_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/pulls{/number}","milestones_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/milestones{/number}","notifications_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/labels{/name}","releases_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/releases{/id}","deployments_url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/deployments","created_at":"2013-09-30T19:14:11Z","updated_at":"2016-01-15T17:59:34Z","pushed_at":"2016-12-07T23:34:00Z","git_url":"git://github.com/endlessm/eos-event-recorder-daemon.git","ssh_url":"git@github.com:endlessm/eos-event-recorder-daemon.git","clone_url":"https://github.com/endlessm/eos-event-recorder-daemon.git","svn_url":"https://github.com/endlessm/eos-event-recorder-daemon","homepage":"","size":1243,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/pulls/214"},"html":{"href":"https://github.com/endlessm/eos-event-recorder-daemon/pull/214"},"issue":{"href":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/issues/214"},"comments":{"href":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/issues/214/comments"},"review_comments":{"href":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/pulls/214/comments"},"review_comment":{"href":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/pulls/214/commits"},"statuses":{"href":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/statuses/73fdbceb45074e515992a4f51e921ff053f76cbf"}}}}
{"actor":{"display_login":"mariospr"}}