From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.58.247.3 with SMTP id ya3csp570451vec; Mon, 3 Sep 2012 11:29:53 -0700 (PDT) Received: by 10.60.13.232 with SMTP id k8mr14288140oec.81.1346696993615; Mon, 03 Sep 2012 11:29:53 -0700 (PDT) Return-Path: Received: from rubyforge.org (50-56-192-79.static.cloud-ips.com. [50.56.192.79]) by mx.google.com with ESMTP id k6si13778814obd.85.2012.09.03.11.29.53; Mon, 03 Sep 2012 11:29:53 -0700 (PDT) Received-SPF: pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 50.56.192.79 as permitted sender) client-ip=50.56.192.79; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 50.56.192.79 as permitted sender) smtp.mail=sup-devel-bounces@rubyforge.org Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 387512E090; Mon, 3 Sep 2012 18:29:53 +0000 (UTC) Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU [18.7.68.36]) by rubyforge.org (Postfix) with ESMTP id 57F912E074 for ; Mon, 3 Sep 2012 18:29:45 +0000 (UTC) X-AuditID: 12074424-b7f856d000000942-7e-5044f719f01b Received: from mailhub-auth-3.mit.edu ( [18.9.21.43]) by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP id 59.F7.02370.917F4405; Mon, 3 Sep 2012 14:29:45 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id q83ITjx5009220; Mon, 3 Sep 2012 14:29:45 -0400 Received: from localhost (c-67-186-133-183.hsd1.ma.comcast.net [67.186.133.183]) (authenticated bits=0) (User authenticated as ezyang@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q83IThhE005919; Mon, 3 Sep 2012 14:29:44 -0400 (EDT) In-reply-to: <1346695742-sup-7650@javelin> To: Alvaro Herrera , sup-devel References: <1345564795-sup-3898@alvh.no-ip.org> <1346648371-12305-1-git-send-email-ezyang@mit.edu> <1346648395-sup-4546@javelin> <1346688000-sup-4643@alvh.no-ip.org> <1346688387-sup-5906@alvh.no-ip.org> <20120903121013.8cpe3jr5wg0kw88k@webmail.mit.edu> <1346695742-sup-7650@javelin> From: "Edward Z. Yang" Date: Mon, 03 Sep 2012 14:29:43 -0400 Message-Id: <1346696946-sup-4602@javelin> User-Agent: Sup/git X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrAIsWRmVeSWpSXmKPExsUixCmqrSv53SXAoHWmlsWFyX/YLR5P38Pu wORx5ddEdo99+yYyBzBFcdmkpOZklqUW6dslcGX0XtnDVHCdq2LTpa2MDYwf2bsYOTkkBEwk +s9vYYGwxSQu3FvP1sXIxSEksI9RYvfHQ+wQznpGift/F0FlupkkWnZtBHI4OJgF1CXWzxMC 6eYU0JLY2TYZbKqIQJRE+8vXrCC2sICPxORjp5ghemczSfx4tBsswQbU++jYUzCbRUBV4szd fUwgNq+ApsTrj5/ABokKCEs8OdLMDGIzC8hLNG+dzTyBkX8WwupZSDILGJlWMcqm5Fbp5iZm 5hSnJusWJyfm5aUW6Zrr5WaW6KWmlG5iBAUeu4vKDsbmQ0qHGAU4GJV4eCs+uQQIsSaWFVfm HmKU5GBSEuWd8QEoxJeUn1KZkVicEV9UmpNafIhRgoNZSYT3y2KgHG9KYmVValE+TEqag0VJ nPd6yk1/IYH0xJLU7NTUgtQimKwMB4eSBG/DN6BGwaLU9NSKtMycEoQ0EwcnyHAeoOGqIDW8 xQWJucWZ6RD5U4y6HC9nnbrLKMSSl5+XKiXOe+grUJEASFFGaR7cHFjCeMUoDvSWMO9tkCoe YLKBm/QKaAkT0BLX92BLShIRUlINjM5brtkr3VXn5vib7q+9M5jb0MdeZMGjqvOmm4ScX+gl vRR9++TW/0dOk/icbk5O/dKtkcg/eaHiVgvHu2xXV2f0XA71e7ovisd/0+QNP/IlPDX+nV76 5uuFstfF87++utsxi0PP/En8qf1Fk/+dbTfq9pCScm4XzefZ3X/k/H/fMylr2md6NiixFGck GmoxFxUnAgDbUik68wIAAA== Subject: Re: [sup-devel] [PATCH] Inotify support for Maildirs. (FIRST DRAFT) X-BeenThere: sup-devel@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Sup developer discussion List-Id: Sup developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-devel-bounces@rubyforge.org Errors-To: sup-devel-bounces@rubyforge.org I think I may have seen Sup peg IO R/W in the way you saw, but when I restarted Sup with debugging, it went away. Do let me know if you see it again; I think there's an infinite loop somewhere. Edward Excerpts from Edward Z. Yang's message of Mon Sep 03 14:09:57 -0400 2012: > OK, cracked a fix; you need this extra patch: > > commit f9ea07f3c4982ab46d8171fdba8eabc3af00c840 > Author: Edward Z. Yang > Date: Mon Sep 3 14:09:34 2012 -0400 > > sync_back after writing to index, not before. > > Signed-off-by: Edward Z. Yang > > diff --git a/lib/sup/index.rb b/lib/sup/index.rb > index 13798d6..4b533a7 100644 > --- a/lib/sup/index.rb > +++ b/lib/sup/index.rb > @@ -657,10 +657,6 @@ EOS > end > > def sync_message m, overwrite > - ## TODO: we should not save the message if the sync_back failed > - ## since it would overwrite the location field > - m.sync_back > - > doc = synchronize { find_doc(m.id) } > existed = doc != nil > doc ||= Xapian::Document.new > @@ -703,6 +699,10 @@ EOS > @xapian.replace_document docid, doc > end > > + # sync_back must be after label update, so that inotify gets > + # fresh data from the index > + m.sync_back > + > m.labels.each { |l| LabelManager << l } > true > end _______________________________________________ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-devel