You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2014/09/10 22:16:34 UTC

svn commit: r1624108 - /lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java

Author: mikemccand
Date: Wed Sep 10 20:16:34 2014
New Revision: 1624108

URL: http://svn.apache.org/r1624108
Log:
improve test debuggability

Modified:
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java?rev=1624108&r1=1624107&r2=1624108&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java Wed Sep 10 20:16:34 2014
@@ -1087,6 +1087,7 @@ public class TestIndexWriter extends Luc
             }
             IndexWriterConfig conf = newIndexWriterConfig(random,
                                                           new MockAnalyzer(random)).setMaxBufferedDocs(2);
+            conf.setInfoStream(log);
             w = new IndexWriter(dir, conf);
 
             Document doc = new Document();
@@ -1102,6 +1103,7 @@ public class TestIndexWriter extends Luc
             doc.add(sortedDVField);
             doc.add(sortedSetDVField);
             for(int i=0;i<100;i++) {
+              log.println("\nTEST: i=" + i);
               idField.setStringValue(Integer.toString(i));
               binaryDVField.setBytesValue(new BytesRef(idField.stringValue()));
               numericDVField.setLongValue(i);



Re: svn commit: r1624108 - /lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java

Posted by Michael McCandless <lu...@mikemccandless.com>.
I opened https://issues.apache.org/jira/browse/LUCENE-5937 for this
but I have doubts...

Mike McCandless

http://blog.mikemccandless.com


On Thu, Sep 11, 2014 at 5:06 AM, Michael McCandless
<lu...@mikemccandless.com> wrote:
> Yeah it's fine to just revert that for now ... I had committed it to
> try to get more info on failure (e.g. when MDW prevents file deletion,
> since it's not confessing on these failures).
>
> Seems like we need to send that PrintStream to a temp file instead ... I'll try.
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
>
> On Wed, Sep 10, 2014 at 8:58 PM, Robert Muir <rc...@gmail.com> wrote:
>> I'm hitting many OOMs because of this. Can we do this in a different way?
>>
>> It costs a lot of time when it fails because there is a "bad apple"
>> test in TestIndexWriter that makes thousands of fields and blows up my
>> console with megabytes of shit... we should pull that test out of
>> TestIndexWriter.
>>
>> On Wed, Sep 10, 2014 at 4:16 PM,  <mi...@apache.org> wrote:
>>> Author: mikemccand
>>> Date: Wed Sep 10 20:16:34 2014
>>> New Revision: 1624108
>>>
>>> URL: http://svn.apache.org/r1624108
>>> Log:
>>> improve test debuggability
>>>
>>> Modified:
>>>     lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
>>>
>>> Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
>>> URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java?rev=1624108&r1=1624107&r2=1624108&view=diff
>>> ==============================================================================
>>> --- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java (original)
>>> +++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java Wed Sep 10 20:16:34 2014
>>> @@ -1087,6 +1087,7 @@ public class TestIndexWriter extends Luc
>>>              }
>>>              IndexWriterConfig conf = newIndexWriterConfig(random,
>>>                                                            new MockAnalyzer(random)).setMaxBufferedDocs(2);
>>> +            conf.setInfoStream(log);
>>>              w = new IndexWriter(dir, conf);
>>>
>>>              Document doc = new Document();
>>> @@ -1102,6 +1103,7 @@ public class TestIndexWriter extends Luc
>>>              doc.add(sortedDVField);
>>>              doc.add(sortedSetDVField);
>>>              for(int i=0;i<100;i++) {
>>> +              log.println("\nTEST: i=" + i);
>>>                idField.setStringValue(Integer.toString(i));
>>>                binaryDVField.setBytesValue(new BytesRef(idField.stringValue()));
>>>                numericDVField.setLongValue(i);
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: dev-help@lucene.apache.org
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: svn commit: r1624108 - /lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java

Posted by Michael McCandless <lu...@mikemccandless.com>.
Yeah it's fine to just revert that for now ... I had committed it to
try to get more info on failure (e.g. when MDW prevents file deletion,
since it's not confessing on these failures).

Seems like we need to send that PrintStream to a temp file instead ... I'll try.

Mike McCandless

http://blog.mikemccandless.com


On Wed, Sep 10, 2014 at 8:58 PM, Robert Muir <rc...@gmail.com> wrote:
> I'm hitting many OOMs because of this. Can we do this in a different way?
>
> It costs a lot of time when it fails because there is a "bad apple"
> test in TestIndexWriter that makes thousands of fields and blows up my
> console with megabytes of shit... we should pull that test out of
> TestIndexWriter.
>
> On Wed, Sep 10, 2014 at 4:16 PM,  <mi...@apache.org> wrote:
>> Author: mikemccand
>> Date: Wed Sep 10 20:16:34 2014
>> New Revision: 1624108
>>
>> URL: http://svn.apache.org/r1624108
>> Log:
>> improve test debuggability
>>
>> Modified:
>>     lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
>>
>> Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
>> URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java?rev=1624108&r1=1624107&r2=1624108&view=diff
>> ==============================================================================
>> --- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java (original)
>> +++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java Wed Sep 10 20:16:34 2014
>> @@ -1087,6 +1087,7 @@ public class TestIndexWriter extends Luc
>>              }
>>              IndexWriterConfig conf = newIndexWriterConfig(random,
>>                                                            new MockAnalyzer(random)).setMaxBufferedDocs(2);
>> +            conf.setInfoStream(log);
>>              w = new IndexWriter(dir, conf);
>>
>>              Document doc = new Document();
>> @@ -1102,6 +1103,7 @@ public class TestIndexWriter extends Luc
>>              doc.add(sortedDVField);
>>              doc.add(sortedSetDVField);
>>              for(int i=0;i<100;i++) {
>> +              log.println("\nTEST: i=" + i);
>>                idField.setStringValue(Integer.toString(i));
>>                binaryDVField.setBytesValue(new BytesRef(idField.stringValue()));
>>                numericDVField.setLongValue(i);
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: svn commit: r1624108 - /lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java

Posted by Robert Muir <rc...@gmail.com>.
I'm hitting many OOMs because of this. Can we do this in a different way?

It costs a lot of time when it fails because there is a "bad apple"
test in TestIndexWriter that makes thousands of fields and blows up my
console with megabytes of shit... we should pull that test out of
TestIndexWriter.

On Wed, Sep 10, 2014 at 4:16 PM,  <mi...@apache.org> wrote:
> Author: mikemccand
> Date: Wed Sep 10 20:16:34 2014
> New Revision: 1624108
>
> URL: http://svn.apache.org/r1624108
> Log:
> improve test debuggability
>
> Modified:
>     lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
>
> Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
> URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java?rev=1624108&r1=1624107&r2=1624108&view=diff
> ==============================================================================
> --- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java (original)
> +++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java Wed Sep 10 20:16:34 2014
> @@ -1087,6 +1087,7 @@ public class TestIndexWriter extends Luc
>              }
>              IndexWriterConfig conf = newIndexWriterConfig(random,
>                                                            new MockAnalyzer(random)).setMaxBufferedDocs(2);
> +            conf.setInfoStream(log);
>              w = new IndexWriter(dir, conf);
>
>              Document doc = new Document();
> @@ -1102,6 +1103,7 @@ public class TestIndexWriter extends Luc
>              doc.add(sortedDVField);
>              doc.add(sortedSetDVField);
>              for(int i=0;i<100;i++) {
> +              log.println("\nTEST: i=" + i);
>                idField.setStringValue(Integer.toString(i));
>                binaryDVField.setBytesValue(new BytesRef(idField.stringValue()));
>                numericDVField.setLongValue(i);
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org