Lucene - Core
  1. Lucene - Core
  2. LUCENE-6117

infostream is currently unusable out of box

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      testpoints used to only be emitted by assertions (still sketchy), but now are emitted always. I assume this is due to the change to support running tests with assertions disabled.

      we should try to clean this up, simple stuff like this is now useless:

      indexWriterConfig.setInfoStream(System.out);
      // causes massive flooding like this:
      // TP 0 [Tue Dec 16 20:19:37 EST 2014; Thread-0]: DocumentsWriterPerThread addDocument start
      // TP 0 [Tue Dec 16 20:19:37 EST 2014; Thread-0]: DocumentsWriterPerThread addDocument start
      // TP 0 [Tue Dec 16 20:19:37 EST 2014; Thread-0]: DocumentsWriterPerThread addDocument start
      

      I hit this several times today just trying to do benchmarks and debugging.

        Activity

        Hide
        Robert Muir added a comment -

        Here is a patch.

        This adds a package private boolean 'enableTestPoints' to IndexWriter. We don't base it on assertion status or any of that, you only want test points if you are one of the few special tests asking for them.

        I refactored all tests to use the RandomIndexWriter.mockIndexWriter for registering listeners at test points, and this sets the necessary boolean for you on IW.

        I also added simple tests ensuring that test points are only output when we ask for them.

        Show
        Robert Muir added a comment - Here is a patch. This adds a package private boolean 'enableTestPoints' to IndexWriter. We don't base it on assertion status or any of that, you only want test points if you are one of the few special tests asking for them. I refactored all tests to use the RandomIndexWriter.mockIndexWriter for registering listeners at test points, and this sets the necessary boolean for you on IW. I also added simple tests ensuring that test points are only output when we ask for them.
        Hide
        Michael McCandless added a comment -

        +1, thanks Rob!

        Show
        Michael McCandless added a comment - +1, thanks Rob!
        Hide
        ASF subversion and git services added a comment -

        Commit 1646240 from Robert Muir in branch 'dev/trunk'
        [ https://svn.apache.org/r1646240 ]

        LUCENE-6117: make infostream usable again

        Show
        ASF subversion and git services added a comment - Commit 1646240 from Robert Muir in branch 'dev/trunk' [ https://svn.apache.org/r1646240 ] LUCENE-6117 : make infostream usable again
        Hide
        ASF subversion and git services added a comment -

        Commit 1646242 from Robert Muir in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1646242 ]

        LUCENE-6117: make infostream usable again

        Show
        ASF subversion and git services added a comment - Commit 1646242 from Robert Muir in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1646242 ] LUCENE-6117 : make infostream usable again
        Hide
        ASF subversion and git services added a comment -

        Commit 1646288 from Michael McCandless in branch 'dev/trunk'
        [ https://svn.apache.org/r1646288 ]

        LUCENE-6117: this test secretly relies on testPoint too

        Show
        ASF subversion and git services added a comment - Commit 1646288 from Michael McCandless in branch 'dev/trunk' [ https://svn.apache.org/r1646288 ] LUCENE-6117 : this test secretly relies on testPoint too
        Hide
        ASF subversion and git services added a comment -

        Commit 1646289 from Michael McCandless in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1646289 ]

        LUCENE-6117: this test secretly relies on testPoint too

        Show
        ASF subversion and git services added a comment - Commit 1646289 from Michael McCandless in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1646289 ] LUCENE-6117 : this test secretly relies on testPoint too
        Hide
        ASF subversion and git services added a comment -

        Commit 1646416 from Michael McCandless in branch 'dev/branches/lucene_solr_4_10'
        [ https://svn.apache.org/r1646416 ]

        LUCENE-6019, LUCENE-6117: remove -Dtests.assert: this is too big a change for a bug-fix release (and it introduced a bug)

        Show
        ASF subversion and git services added a comment - Commit 1646416 from Michael McCandless in branch 'dev/branches/lucene_solr_4_10' [ https://svn.apache.org/r1646416 ] LUCENE-6019 , LUCENE-6117 : remove -Dtests.assert: this is too big a change for a bug-fix release (and it introduced a bug)
        Hide
        Anshum Gupta added a comment -

        Bulk close after 5.0 release.

        Show
        Anshum Gupta added a comment - Bulk close after 5.0 release.

          People

          • Assignee:
            Unassigned
            Reporter:
            Robert Muir
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development