Solr
  1. Solr
  2. SOLR-2695

DIH's TestThreaded sometimes fails

    Details

      Description

      ant test -Dtestcase=TestThreaded -Dtestmethod=testCompositePk_FullImport -Dtests.seed=-1937805576288697697:-9126472343809792878 sometimes hits this:

          [junit] 3-aug-2011 15:11:57 org.apache.solr.handler.dataimport.DocBuilder doFullDump
          [junit] SEVERE: error in import
          [junit] java.lang.ArrayIndexOutOfBoundsException: 1
          [junit] 	at java.util.ArrayList.add(ArrayList.java:352)
          [junit] 	at org.apache.solr.handler.dataimport.DocBuilder$EntityRunner.runAThread(DocBuilder.java:523)
          [junit] 	at org.apache.solr.handler.dataimport.DocBuilder$EntityRunner.access$000(DocBuilder.java:396)
          [junit] 	at org.apache.solr.handler.dataimport.DocBuilder$EntityRunner$1.run(DocBuilder.java:449)
          [junit] 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          [junit] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          [junit] 	at java.lang.Thread.run(Thread.java:619)
          [junit] 3-aug-2011 15:11:57 org.apache.solr.SolrTestCaseJ4 assertQ
      
      

      I think it's a thread safety bug in the debug code (an ArrayList is add'd w/o sync) only if reqParams.debug.

      1. SOLR-2695.patch
        0.7 kB
        Shalin Shekhar Mangar
      2. SOLR-2695-branch_3x.patch
        1 kB
        Shalin Shekhar Mangar

        Activity

        Hide
        Shalin Shekhar Mangar added a comment -

        The debug documents list needs to be synchronized.

        Show
        Shalin Shekhar Mangar added a comment - The debug documents list needs to be synchronized.
        Hide
        Shalin Shekhar Mangar added a comment -

        Patch for branch_3x

        Show
        Shalin Shekhar Mangar added a comment - Patch for branch_3x
        Hide
        Shalin Shekhar Mangar added a comment -

        Committed revision 1153844 on trunk and 1153848 on branch_3x.

        Show
        Shalin Shekhar Mangar added a comment - Committed revision 1153844 on trunk and 1153848 on branch_3x.
        Hide
        Uwe Schindler added a comment -

        Bulk close after 3.4 is released

        Show
        Uwe Schindler added a comment - Bulk close after 3.4 is released

          People

          • Assignee:
            Shalin Shekhar Mangar
            Reporter:
            Michael McCandless
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development