--- /dev/null
+Return-Path: <patricktotzke@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 25E7E431FBD\r
+ for <notmuch@notmuchmail.org>; Tue, 11 Dec 2012 10:26:47 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id BD7mH5h8VfnV for <notmuch@notmuchmail.org>;\r
+ Tue, 11 Dec 2012 10:26:46 -0800 (PST)\r
+Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com\r
+ [209.85.212.175]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 51B15431FBC\r
+ for <notmuch@notmuchmail.org>; Tue, 11 Dec 2012 10:26:46 -0800 (PST)\r
+Received: by mail-wi0-f175.google.com with SMTP id hm11so2094754wib.2\r
+ for <notmuch@notmuchmail.org>; Tue, 11 Dec 2012 10:26:43 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+ h=content-type:mime-version:content-disposition:to:from:in-reply-to\r
+ :cc:references:message-id:user-agent:subject:date;\r
+ bh=R9pZyJkU0CFmldU2joZA0jvKor0C37/xDY78a1vH49Q=;\r
+ b=gIxScFvlbW9Wuti5xZpTjEk8Q3kLDdTCGfqZ17qMGcgKVa70ElhlJLq0hex0jFChZF\r
+ oqyIN5Klmv8vvmt0Sg8rs2uMDcGZhQiWM8fdtynmC3UWfs9pAXnrt9pThsGsAlmHjnUV\r
+ wUcfEy4kSLpTx+76F5lk/LiQwDgGRIcsUqZbA89bK+POA9SG6QJxxh7SbLQZNWvcvRAm\r
+ TVpzfr2XRB8e8XKEOjzq+U0dKuCpLaSJjxy6Rd7OsrUHVmxKp7HXKt7ff1+w8MwU7I1j\r
+ GfSv9cdv5iRz1c+EWExRkhiRONks6hX7dHAel2ym1w+1JqwS0VBpBl2YrLwF3pT03lH2\r
+ CB9Q==\r
+Received: by 10.194.82.2 with SMTP id e2mr2122285wjy.39.1355250402531;\r
+ Tue, 11 Dec 2012 10:26:42 -0800 (PST)\r
+Received: from localhost (cpc14-sgyl28-2-0-cust332.18-2.cable.virginmedia.com.\r
+ [82.39.85.77])\r
+ by mx.google.com with ESMTPS id bd7sm17437419wib.8.2012.12.11.10.26.39\r
+ (version=TLSv1/SSLv3 cipher=OTHER);\r
+ Tue, 11 Dec 2012 10:26:40 -0800 (PST)\r
+Content-Type: multipart/signed; protocol="application/pgp-signature";\r
+ micalg="pgp-sha1"; boundary="===============7418330742985369319=="\r
+MIME-Version: 1.0\r
+Content-Disposition: inline\r
+To: "Jason A. Donenfeld" <Jason@zx2c4.com>, \r
+From: Patrick Totzke <patricktotzke@gmail.com>\r
+In-Reply-To:\r
+ <CAHmME9phAD0JKHDf+1KuCPyo4WXpDW5NESAE_iT3Ruv3bEVCuw@mail.gmail.com>\r
+References:\r
+ <CAHmME9phAD0JKHDf+1KuCPyo4WXpDW5NESAE_iT3Ruv3bEVCuw@mail.gmail.com>\r
+Message-ID: <20121211182638.27237.98903@brick.lan>\r
+User-Agent: alot/0.3.3+\r
+Subject: Re: notmuch python bindings corrupt db index (was: gmail importer\r
+ script)\r
+Date: Tue, 11 Dec 2012 18:26:38 +0000\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 11 Dec 2012 18:26:47 -0000\r
+\r
+--===============7418330742985369319==\r
+Content-Type: text/plain; charset="utf-8"\r
+MIME-Version: 1.0\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+Quoting Jason A. Donenfeld (2012-12-11 13:47:32)\r
+> On Tue, Dec 11, 2012 at 11:04 AM, Patrick Totzke\r
+> <patricktotzke@gmail.com> wrote:\r
+> > I ended up killing the process after i saw that ETA was >3h.\r
+> =\r
+\r
+> Gmail's bottleneck. Very unfortunate. Leave it going over night.\r
+\r
+OK, i assumed i'd not have to download all messages because i already have =\r
+them\r
+on disk -- synced via offlineimap. but then i remembered that OI stores uses\r
+its own naming scheme for the files in a maildir. so thats probably why you=\r
+r script\r
+did not realize theyre already there. (maybe it should? it could look up th=\r
+e MIDs from notmuch)\r
+\r
+> > This broke my index!\r
+> >\r
+> > afterwards, a `notmuch new` printed\r
+> >\r
+> > A Xapian exception occurred creating a directory: Expected block\r
+> > 485 to be level 1, not 0.\r
+> >\r
+> > I wasnt able to properly read the index anymore and had to\r
+> > restore an old index dump. not cool!\r
+> =\r
+\r
+> =\r
+\r
+> Can you provide any more information about this? The script properly\r
+> uses atomic transactions. Any corruption here is the result of a\r
+> notmuch library bug, which should be investigated.\r
+\r
+i am kind of reluctant to reproduce this again (on my work-desktop).\r
+All i did was start your script, writing to the index in another terminal i=\r
+n between (using alot)\r
+possibly my cronjob fired a "notmuch new; afew.." in between also.\r
+when I killed your script the index war broken.\r
+\r
+Can i turn on some global logging for notmuch to debug this?\r
+Maybe libnotmuch had trouble with so many db-writes at a time?\r
+\r
+/p\r
+\r
+\r
+\r
+--===============7418330742985369319==\r
+MIME-Version: 1.0\r
+Content-Transfer-Encoding: 7bit\r
+Content-Description: signature\r
+Content-Type: application/pgp-signature; name="signature.asc"; charset="us-ascii"\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.11 (GNU/Linux)\r
+\r
+iEYEABECAAYFAlDHet4ACgkQlDQDZ9fWxap4BgCdFxBrgs+jIadzi/xvsAVB9mnY\r
+s2UAoJZXSab5ftLEa1+d7ORHFiHsJy62\r
+=WT0i\r
+-----END PGP SIGNATURE-----\r
+\r
+--===============7418330742985369319==--\r