{"push_id":1448117687,"size":4,"distinct_size":1,"ref":"refs/heads/master","head":"245886b33ac369e210a3d7ad8ac666d0f7575534","before":"49ddeb94a1a46024f758a933cda765f88c9c1d96","commits":[{"sha":"dc857b681f05c664dc4b0c3fb4488043ea5812db","author":{"name":"Mario Sanchez Prada","email":"b8d4dbb44dca902de46d5ef51e6fdb577fd88e98@endlessm.com"},"message":"Clear all the metrics data when corrupt data is found in the cache\n\nThe binary format stored in the persistent cache is very sensitive to\nunexpected changes, meaning that once we get into a state where the\nserver reads corrupt data out of it (e.g. zero-sized elements), it will\nstay stuck into that situation unless it somehow manages to find the\nnext valid chunk of data in the circular file, which is not trivial.\n\nFor now, to prevent this situation where a device remains stuck\nforever, we detect the issue accordingly while reading from the\ncircular file and reset all its contents when that happens, so\nthat at least the metrics can be used again afterwards.\n\nhttps://phabricator.endlessm.com/T12739","distinct":false,"url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/commits/dc857b681f05c664dc4b0c3fb4488043ea5812db"},{"sha":"9368ff7ebe4207f6d8e6d293b81ee1bc5c58d5a5","author":{"name":"Mario Sanchez Prada","email":"b8d4dbb44dca902de46d5ef51e6fdb577fd88e98@endlessm.com"},"message":"In case of invalid data, try to keep as much valid information as possible\n\nThe current implementation of the persistent cache is a (FIFO) circular\nfile where we basically read data from a HEAD up to SIZE (up to a maximum\nsize, as configured). In this situation, if we read valid data for a while\nafter HEAD but then find invalid elements before reading all the SIZE bytes,\nwe could still use the good ones we read and simply discard the rest.\n\nSo, this patch makes sure that we do only read valid elements from the\ncircular file and that the invalid bits get ignored, so that we don't\nraise an G_IO_ERROR_INVALID_DATA error from emer_persistent_cache_read()\nunless it's strictly needed (i.e. when not having detected it sooner).\n\nhttps://phabricator.endlessm.com/T12739","distinct":false,"url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/commits/9368ff7ebe4207f6d8e6d293b81ee1bc5c58d5a5"},{"sha":"3714315ccddd7406a27b6fc0c9ed5db539ecab28","author":{"name":"Mario Sanchez Prada","email":"b8d4dbb44dca902de46d5ef51e6fdb577fd88e98@endlessm.com"},"message":"Send a metric event when invalid or corrupt data is found in the cache\n\nIn order to detect when this kind of situation happens, and how often,\nreport two new metrics events right after dealing with the data stored\nin the cache, so that we can analyze them accordingly.\n\nAt the moment, two new metrics events are defined:\n\n* CACHE_IS_CORRUPT_EVENT_ID: \"d84b9a19-9353-73eb-70bf-f91a584abcbd\"\n* CACHE_HAS_INVALID_ELEMENTS_EVENT_ID: \"cbfbcbdb-6af2-f1db-9e11-6cc25846e296\"\n\nThe first one won't include any payload and will simply serve to inform\nwhen the whole cache has been purged, in the event that some malformed\ndata had made it to the file.\n\nThe second one will include a '(tt)' payload with the number of valid\nrecords read from the cache and the number of bytes read in total.\n\nhttps://phabricator.endlessm.com/T12739","distinct":false,"url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/commits/3714315ccddd7406a27b6fc0c9ed5db539ecab28"},{"sha":"245886b33ac369e210a3d7ad8ac666d0f7575534","author":{"name":"Cosimo Cecchi","email":"5a088d11150e96cf8393ec7e0d26dab3d7c14148@gnome.org"},"message":"Merge pull request #214 from endlessm/T12739\n\nGracefully handle invalid/corrupt data in the persistent cache","distinct":true,"url":"https://api.github.com/repos/endlessm/eos-event-recorder-daemon/commits/245886b33ac369e210a3d7ad8ac666d0f7575534"}]}
{"actor":{"display_login":"cosimoc"}}