[jira] [Commented] (LUCENE-4848) Fix Directory implementations to use NIO2 APIs

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (LUCENE-4848) Fix Directory implementations to use NIO2 APIs

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/LUCENE-4848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13607600#comment-13607600 ]

Michael Poindexter commented on LUCENE-4848:
--------------------------------------------

bq. Can you post a stack trace from linux, for example? I'm on windows right now. If it's a thread pool those workers need to be idle somewhere, right?

Here's a stack from a Mac.  There's really nothing to distinguish it from any other thread pool.

"LUCENETESTIGNORED" daemon prio=5 tid=0x00007f95bccfd000 nid=0x5503 waiting on condition [0x0000000113a10000]
   java.lang.Thread.State: TIMED_WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x00000007e8da1468> (a java.util.concurrent.SynchronousQueue$TransferStack)
        at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
        at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:460)
        at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:359)
        at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:942)
        at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1043)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1103)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:722)

bq.  Oh, one more thing – I debated a bit about whether we could just make the "default" executor inside asyncdirectory not the system-default one. Then the problem of detecting these would pretty much go away because we could use whatever the hell we wanted.

Yes, this was actually my first approach.  At least on Mac the JRE creates some threads for it's own use in spite of this.
               

> Fix Directory implementations to use NIO2 APIs
> ----------------------------------------------
>
>                 Key: LUCENE-4848
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4848
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Michael Poindexter
>            Assignee: Uwe Schindler
>            Priority: Minor
>         Attachments: jdk7directory.zip, LUCENE-4848-MMapDirectory.patch, LUCENE-4848.patch, LUCENE-4848.patch, LUCENE-4848.patch, LUCENE-4848.patch, LUCENE-4848.patch, LUCENE-4848.patch.txt
>
>
> I have implemented 3 Directory subclasses using NIO2 API's (available on JDK7).  These may be suitable for inclusion in a Lucene contrib module.
> See the mailing list at http://lucene.markmail.org/thread/lrv7miivzmjm3ml5 for more details about this code and the advantages it provides.
> The code is attached as a zip to this issue.  I'll be happy to make any changes requested.  I've included some minimal smoke tests, but any help in how to use the normal Lucene tests to perform more thorough testing would be appreciated.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]