Repository navigation
lib/ur: Send unreported failures on shutdown - #7164
Conversation
|
Is there reason to believe we have time to write them to disk? (And if there is, why don't we have time to send them upstream instead?) |
|
Suture gives a service 10s to terminate, which is hopefully enough to write to disk. However shutdown should be as fast as possible, and given the pretty long timeouts we have on all these network sending tasks, I classified them as too slow to happen on shutdown. In normal circumstances that's probably not the case, and we could try to send for e.g. 100ms and only write to disk if that fails. |
| } | ||
| return | ||
| } | ||
| if err := sendFailureReports(ctx, reports, url); err != nil { |
There was a problem hiding this comment.
delete the file after it's sent, or it will get sent repeatedly?
|
I'm kinda sorta feeling this is too much machinery for quite little gain, but i'm not going to actively fight it. |
|
Has the failure stuff proven to be useful thus far? |
e3b5c41 to
ef94070
Compare
|
It just feels wrong to not report most fatal errors by design. However I agree storing stuff on disk is too much machinery for the gain. To still have some chance of getting reports sent on shutdown, it now tries to send reports on shutdown, with a timeout of half the service timeout (which is now accessible as And for reasons I acted on |
|
Is fine, requires reviving... :/ |
* main: lib/model: Remove obsolete return val from ccHandleFolders (ref syncthing#6443) (syncthing#7229) gui, man, authors: Update docs, translations, and contributors gui: Fix missing sharing device when adding pending folder (syncthing#7227) cmd/stevents: Add command line argument for event type filtering. (syncthing#7226) lib/ur: Send unreported failures on shutdown (syncthing#7164) gui: Fix nonfunctional ignore button on pending folder notification (syncthing#7224)
If a fatal error should be reported, chances are good we are getting shut down before they can be reported. To mitigate that unsent reports are written to disk when the service stops and these failures are then reported on next startup.