Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 12C743B8C for ; Mon, 2 May 2011 19:00:47 +0000 (UTC) Received: (qmail 11160 invoked by uid 500); 2 May 2011 19:00:45 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 11074 invoked by uid 500); 2 May 2011 19:00:45 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 11067 invoked by uid 99); 2 May 2011 19:00:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 May 2011 19:00:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 May 2011 19:00:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id DDC14BEDCC for ; Mon, 2 May 2011 19:00:03 +0000 (UTC) Date: Mon, 2 May 2011 19:00:03 +0000 (UTC) From: "Dawid Weiss (JIRA)" To: dev@lucene.apache.org Message-ID: <667310946.15881.1304362803905.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <585341490.12111.1304099223657.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (LUCENE-3054) SorterTemplate.quickSort stack overflows on broken comparators that produce only few disticnt values in large arrays MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-3054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13027772#comment-13027772 ] Dawid Weiss commented on LUCENE-3054: ------------------------------------- I'm sure many of you know this, but there is a new implementation of mergesort in java.util.Collections -- it is based on a few clever heuristics (so it is a merge sort, only a finely tuned one) and has been ported/ partially inspired by the sort in Python as far as I recall. Maybe it'd be sensible to compare against this and see what happens. I know Lucene/Solr would rather have its own implementation so that it doesn't rely on the standard library, but in my benchmarks the implementation in Collections.sort() was hard to beat... > SorterTemplate.quickSort stack overflows on broken comparators that produce only few disticnt values in large arrays > -------------------------------------------------------------------------------------------------------------------- > > Key: LUCENE-3054 > URL: https://issues.apache.org/jira/browse/LUCENE-3054 > Project: Lucene - Java > Issue Type: Task > Affects Versions: 3.1 > Reporter: Robert Muir > Assignee: Uwe Schindler > Priority: Critical > Fix For: 3.1.1, 3.2, 4.0 > > Attachments: LUCENE-3054-stackoverflow.patch, LUCENE-3054.patch, LUCENE-3054.patch, LUCENE-3054.patch, LUCENE-3054.patch, LUCENE-3054.patch, LUCENE-3054.patch > > > Looking at Otis's sort problem on the mailing list, he said: > {noformat} > * looked for other places where this call is made - found it in > MultiPhraseQuery$MultiPhraseWeight and changed that call from > ArrayUtil.quickSort to ArrayUtil.mergeSort > * now we no longer see SorterTemplate.quickSort in deep recursion when we do a > thread dump > {noformat} > I thought this was interesting because PostingsAndFreq's comparator > looks like it needs a tiebreaker. > I think in our sorts we should add some asserts to try to catch some of these broken comparators. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org