From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 122A41F66F for ; Fri, 28 Aug 2020 10:13:01 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/3] watch: flush changes to inbox before updating IMAPTracker Date: Fri, 28 Aug 2020 10:12:58 +0000 Message-Id: <20200828101300.17939-2-e@yhbt.net> In-Reply-To: <20200828101300.17939-1-e@yhbt.net> References: <20200828101300.17939-1-e@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Data needs to hit inboxes, first. Otherwise it's possible to skip messages in case git-fast-import is killed before it sees "done\n". Now, -watch will just waste a little bandwidth in re-downloading a seen message if it's interrupted immediately before updating IMAPTracker. --- lib/PublicInbox/WatchMaildir.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/WatchMaildir.pm b/lib/PublicInbox/WatchMaildir.pm index 4ae400f7..78aec8a2 100644 --- a/lib/PublicInbox/WatchMaildir.pm +++ b/lib/PublicInbox/WatchMaildir.pm @@ -918,8 +918,8 @@ sub nntp_fetch_all ($$$) { } $last_art = $art; } - $itrk->update_last(0, $last_art) if defined $last_art; _done_for_now($self); + $itrk->update_last(0, $last_art) if defined $last_art; $err; }