You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Uwe Schindler (JIRA)" <ji...@apache.org> on 2010/09/17 23:38:32 UTC

[jira] Created: (LUCENE-2651) Add support for MMapDirectory's unmap in Apache Harmony

Add support for MMapDirectory's unmap in Apache Harmony
-------------------------------------------------------

                 Key: LUCENE-2651
                 URL: https://issues.apache.org/jira/browse/LUCENE-2651
             Project: Lucene - Java
          Issue Type: Improvement
            Reporter: Uwe Schindler
            Assignee: Uwe Schindler
             Fix For: 3.1, 4.0


The setUseUnmap does not work on Apache Harmony, this patch adds support for it. It also fixes a small problem, that unmapping a clone may cause a sigsegv.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (LUCENE-2651) Add support for MMapDirectory's unmap in Apache Harmony

Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12911031#action_12911031 ] 

Robert Muir commented on LUCENE-2651:
-------------------------------------

I tested the patch, i don't think we should add this yet.

at a basic level, it works. for example TestIndexFileDeleter.testDeleteLeftoverFiles will pass, where it fails without it.
but other tests will fail, such as TestIndexReaderReopen.

its worth mentioning that mmapdirectory didnt even work at all with 5.0M14, and only started working with 5.0M15 (released a few days ago).
before the latest release it just wrote corrupted indexes.

so it would be better for now to not supply a cleaner for harmony, and let it default to SimpleFSDirectory always.


> Add support for MMapDirectory's unmap in Apache Harmony
> -------------------------------------------------------
>
>                 Key: LUCENE-2651
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2651
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2651.patch, LUCENE-2651.patch, LUCENE-2651.patch
>
>
> The setUseUnmap does not work on Apache Harmony, this patch adds support for it. It also fixes a small problem, that unmapping a clone may cause a sigsegv.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (LUCENE-2651) Add support for MMapDirectory's unmap in Apache Harmony

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2651?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2651:
----------------------------------

    Attachment: LUCENE-2651.patch

Just for completeness: Improved version of the enum, to be easier extendable. We should wait a bit until Harmony works correct and then use the basic code to do the free there.

For other VMs (IBM Rockit) it seems that all emulate Platform.SUN.

> Add support for MMapDirectory's unmap in Apache Harmony
> -------------------------------------------------------
>
>                 Key: LUCENE-2651
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2651
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2651.patch, LUCENE-2651.patch, LUCENE-2651.patch, LUCENE-2651.patch
>
>
> The setUseUnmap does not work on Apache Harmony, this patch adds support for it. It also fixes a small problem, that unmapping a clone may cause a sigsegv.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (LUCENE-2651) Add support for MMapDirectory's unmap in Apache Harmony

Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12910818#action_12910818 ] 

Robert Muir commented on LUCENE-2651:
-------------------------------------

Hi, will test this soon.

Can we apply the 4 changes (MMapII.close(), MMapII.clone(), MultiMMapII.close(), MultiMMapII.clone())  here to both trunk/3x?

I think the defaults issue (LUCENE-2650) should only apply to trunk, but the extra safety is good to go in 3.x
I could then just drop them from my patch over there.

> Add support for MMapDirectory's unmap in Apache Harmony
> -------------------------------------------------------
>
>                 Key: LUCENE-2651
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2651
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2651.patch, LUCENE-2651.patch
>
>
> The setUseUnmap does not work on Apache Harmony, this patch adds support for it. It also fixes a small problem, that unmapping a clone may cause a sigsegv.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (LUCENE-2651) Add support for MMapDirectory's unmap in Apache Harmony

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2651?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2651:
----------------------------------

    Attachment: LUCENE-2651.patch

Generics Policeman violated himself. Fixed patch.

> Add support for MMapDirectory's unmap in Apache Harmony
> -------------------------------------------------------
>
>                 Key: LUCENE-2651
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2651
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2651.patch, LUCENE-2651.patch
>
>
> The setUseUnmap does not work on Apache Harmony, this patch adds support for it. It also fixes a small problem, that unmapping a clone may cause a sigsegv.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (LUCENE-2651) Add support for MMapDirectory's unmap in Apache Harmony

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2651?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2651:
----------------------------------

    Attachment: LUCENE-2651.patch

I completed the patch, I missed the extra check in clone().

> Add support for MMapDirectory's unmap in Apache Harmony
> -------------------------------------------------------
>
>                 Key: LUCENE-2651
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2651
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2651.patch, LUCENE-2651.patch, LUCENE-2651.patch
>
>
> The setUseUnmap does not work on Apache Harmony, this patch adds support for it. It also fixes a small problem, that unmapping a clone may cause a sigsegv.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (LUCENE-2651) Add support for MMapDirectory's unmap in Apache Harmony

Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2651?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-2651:
--------------------------------

    Component/s: Store

> Add support for MMapDirectory's unmap in Apache Harmony
> -------------------------------------------------------
>
>                 Key: LUCENE-2651
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2651
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Store
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2651.patch, LUCENE-2651.patch, LUCENE-2651.patch, LUCENE-2651.patch
>
>
> The setUseUnmap does not work on Apache Harmony, this patch adds support for it. It also fixes a small problem, that unmapping a clone may cause a sigsegv.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (LUCENE-2651) Add support for MMapDirectory's unmap in Apache Harmony

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2651?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2651:
----------------------------------

    Attachment:     (was: LUCENE-2651.patch)

> Add support for MMapDirectory's unmap in Apache Harmony
> -------------------------------------------------------
>
>                 Key: LUCENE-2651
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2651
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2651.patch, LUCENE-2651.patch, LUCENE-2651.patch
>
>
> The setUseUnmap does not work on Apache Harmony, this patch adds support for it. It also fixes a small problem, that unmapping a clone may cause a sigsegv.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (LUCENE-2651) Add support for MMapDirectory's unmap in Apache Harmony

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2651?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2651:
----------------------------------

    Attachment: LUCENE-2651.patch

First totally untested patch. This refactors the unmap hack to an enum, that has a unique value for each platform.

Robert: can you test on Harmony?

> Add support for MMapDirectory's unmap in Apache Harmony
> -------------------------------------------------------
>
>                 Key: LUCENE-2651
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2651
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2651.patch
>
>
> The setUseUnmap does not work on Apache Harmony, this patch adds support for it. It also fixes a small problem, that unmapping a clone may cause a sigsegv.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (LUCENE-2651) Add support for MMapDirectory's unmap in Apache Harmony

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2651?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2651:
----------------------------------

    Attachment: LUCENE-2651.patch

Some minor improvements to the patch. Passes on windows with Sun JVM (as expected). It reverts the default to enable unmap hack, this should be done in LUCENE-2650.

> Add support for MMapDirectory's unmap in Apache Harmony
> -------------------------------------------------------
>
>                 Key: LUCENE-2651
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2651
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2651.patch, LUCENE-2651.patch, LUCENE-2651.patch
>
>
> The setUseUnmap does not work on Apache Harmony, this patch adds support for it. It also fixes a small problem, that unmapping a clone may cause a sigsegv.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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