Sync event databases on persist_ping_lifetime_data#3223
Conversation
chutten
left a comment
There was a problem hiding this comment.
Needs CHANGELOG.md
API design: Yeah, okay, it kinda tracks. Events are ping-lifetime and this does persist them.
Tests: I guess we need to record events and then forceably crash the app to prove that persist_ping_lifetime_data is necessary to persist events to disk now?
Instrumentation: Do we want to monitor how often sync_all errors out? Seems likely. Though if it's recorded in a ping-lifetime metric we might not ever receive it.
Logging: Is it an error? There's nothing anyone can do about it. Seems like at most a warn. Do we want to spend some words on why this might matter (e.g. "Recently-recorded events for ping {file} have not been persisted to disk and may be lost")?
The problem with that wording is: it's not accurate. if fsync fails we don't really know whether data is safely persisted or not. Or which data. Anyway, fun! |
It would be much more complicated than that. Even on crashes most likely data is written to disk just fine if the app worked normally before the crash. |
chutten
left a comment
There was a problem hiding this comment.
(about testing) Fair 'nuff.
(Still needs CHANGELOG)
Instead of #3220
I'd like to defer this until after the release.