From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id EF2AF2018E; Fri, 5 Aug 2016 11:26:35 +0000 (UTC) Date: Fri, 5 Aug 2016 11:26:35 +0000 From: Eric Wong To: meta@public-inbox.org Subject: Re: [WIP] search: disable batching in newer versions of Xapian, for now Message-ID: <20160805112635.GA20162@starla> References: <20160805112145.19998-1-e@80x24.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160805112145.19998-1-e@80x24.org> List-Id: Eric Wong wrote: > $self->{batch_size} = 100; > + > + # XXX temporary hack... > + my $v = ((Search::Xapian::major_version << 16) | > + (Search::Xapian::minor_version << 8 ) | > + Search::Xapian::revision()); > + if ($v >= 0x10222) { # >= 1.2.22 if ($v >= 0x1222) { # >= 1.2.22 Meh, I need sleep, this workaround is bogus even with the above fix. > + warn "batch size unsupported in ", > + $Search::Xapian::VERSION, "\n"; > + $self->{batch_size} = undef; > + } > + > $flag = Search::Xapian::DB_CREATE_OR_OPEN; > _lock_acquire($self); > }