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-ASN: AS6315 166.70.0.0/16 X-Spam-Status: No, score=-3.6 required=3.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out03.mta.xmission.com (out03.mta.xmission.com [166.70.13.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id E6A6C1F4BD; Thu, 10 Oct 2019 11:05:57 +0000 (UTC) Received: from in02.mta.xmission.com ([166.70.13.52]) by out03.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1iIWGa-0002xx-WB; Thu, 10 Oct 2019 05:05:57 -0600 Received: from ip68-227-160-95.om.om.cox.net ([68.227.160.95] helo=x220.xmission.com) by in02.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.87) (envelope-from ) id 1iIWGa-0002KY-41; Thu, 10 Oct 2019 05:05:56 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Eric Wong Cc: meta@public-inbox.org References: <87imp05hlm.fsf@alyssa.is> <20191008001050.rwd7bh7cek7qrydi@dcvr> <87wodfctwd.fsf@x220.int.ebiederm.org> <20191008221108.3wsso25kviiwd7ek@dcvr> <87wodec1um.fsf@x220.int.ebiederm.org> <20191008224104.GA24142@dcvr> <87h84ibb9m.fsf@x220.int.ebiederm.org> <87wode9vxw.fsf_-_@x220.int.ebiederm.org> <87h84i9vta.fsf_-_@x220.int.ebiederm.org> <20191010094342.r57ubvl75trauj6b@dcvr> Date: Thu, 10 Oct 2019 06:05:10 -0500 In-Reply-To: <20191010094342.r57ubvl75trauj6b@dcvr> (Eric Wong's message of "Thu, 10 Oct 2019 09:43:42 +0000") Message-ID: <87zhi83lp5.fsf@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1iIWGa-0002KY-41;;;mid=<87zhi83lp5.fsf@x220.int.ebiederm.org>;;;hst=in02.mta.xmission.com;;;ip=68.227.160.95;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1+4ioHIC5KN3xlybMHA1JIWhv/nY4Sw3cc= X-SA-Exim-Connect-IP: 68.227.160.95 X-SA-Exim-Mail-From: ebiederm@xmission.com Subject: Re: [PATCH 2/4] PublicInbox::Config: Process mailboxes in sorted order X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) List-Id: Eric Wong writes: > "Eric W. Biederman" wrote: >> >> Date: Thu, 16 May 2019 19:26:47 -0500 >> >> To make the results reproducible and comprehensible when >> a large number of mail boxes are being processed process the >> mail boxes in sorted order, instead of in random hash order. >> >> Signed-off-by: "Eric W. Biederman" >> --- >> lib/PublicInbox/Config.pm | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm >> index 9f3f8df7eeaa..9ec00b0ddb6d 100644 >> --- a/lib/PublicInbox/Config.pm >> +++ b/lib/PublicInbox/Config.pm >> @@ -128,7 +128,7 @@ sub each_inbox { >> } >> } else { >> my %seen; >> - foreach my $k (keys %$self) { >> + foreach my $k (sort keys %$self) { >> $k =~ m!\Apublicinbox\.([^/]+)\.mainrepo\z! or next; >> next if $seen{$1}; >> $seen{$1} = 1; > > I'm not sure if that code path happens outside of tests. > If it's parsing "git config -l" output, it'll use section_order > which preserves the ordering of the config file. > > Will take a deeper look tomorrow (and possibly rewrite those > tests to parse a scalarref instead of just taking a hashref). I know I have at least one use in my import_imap_inbox script. Looking at the dates it looks like I added this in July 2018, and you added section order in January 2019. So it may be you have a better fix in place already and I simply hadn't noticed. Eric