]> Sergey Matveev's repositories - public-inbox.git/commit
improve error handling on import fork / lock failures
authorEric Wong <e@yhbt.net>
Fri, 31 Jul 2020 21:36:18 +0000 (21:36 +0000)
committerEric Wong <e@yhbt.net>
Sat, 1 Aug 2020 08:07:39 +0000 (08:07 +0000)
commit0faddbbfecaa784c584d3a625628c288fe9316c7
tree14beae8e952d30e551c470d52c947cb831d362fe
parent0821af5f21fdb083020ae2e3e79e4227ef59cd4f
improve error handling on import fork / lock failures

v?fork failures seems to be the cause of locks not getting
released in -watch.  Ensure lock release doesn't get skipped
in ->done for both v1 and v2 inboxes.  We also need to do
everything we can to ensure DB handles, pipes and processes
get released even in the face of failure.

While we're at it, make failures around `git update-server-info'
non-fatal, since smart HTTP seems more popular anyways.

v2 changes:
- spawn: show failing command
- ensure waitpid is synchronous for inotify events
- teardown all fast-import processes on exception,
  not just the failing one
- beef up lock_release error handling
- release lock on fast-import spawn failure
lib/PublicInbox/DirIdle.pm
lib/PublicInbox/Import.pm
lib/PublicInbox/Lock.pm
lib/PublicInbox/Spawn.pm
lib/PublicInbox/V2Writable.pm
lib/PublicInbox/WatchMaildir.pm
t/psgi_search.t