From dev-return-235656-apmail-lucene-dev-archive=lucene.apache.org@lucene.apache.org Sun Feb 14 23:35:20 2016 Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5753D181A9 for ; Sun, 14 Feb 2016 23:35:20 +0000 (UTC) Received: (qmail 25163 invoked by uid 500); 14 Feb 2016 23:35:18 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 25080 invoked by uid 500); 14 Feb 2016 23:35:18 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 25049 invoked by uid 99); 14 Feb 2016 23:35:18 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Feb 2016 23:35:18 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 2F5052C1F58 for ; Sun, 14 Feb 2016 23:35:18 +0000 (UTC) Date: Sun, 14 Feb 2016 23:35:18 +0000 (UTC) From: "Uwe Schindler (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (LUCENE-6989) Implement MMapDirectory unmapping for coming Java 9 changes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LUCENE-6989?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Uwe Schindler updated LUCENE-6989: ---------------------------------- Attachment: (was: LUCENE-6989.patch) > Implement MMapDirectory unmapping for coming Java 9 changes > ----------------------------------------------------------- > > Key: LUCENE-6989 > URL: https://issues.apache.org/jira/browse/LUCENE-6989 > Project: Lucene - Core > Issue Type: Task > Components: core/store > Reporter: Uwe Schindler > Assignee: Uwe Schindler > Priority: Critical > Attachments: LUCENE-6989.patch, LUCENE-6989.patch, LUCENE-6989.patch > > > Originally, the sun.misc.Cleaner interface was declared as "critical API" in [JEP 260|http://openjdk.java.net/jeps/260 ] > Unfortunately the decission was changed in favor of a oficially supported {{java.lang.ref.Cleaner}} API. A side effect of this change is to move all existing {{sun.misc.Cleaner}} APIs into a non-exported package. This causes our forceful unmapping to no longer work, because we can get the cleaner instance via reflection, but trying to invoke it will throw one of the new Jigsaw RuntimeException because it is completely inaccessible. This will make our forceful unmapping fail. There are also no changes in Garbage collector, the problem still exists. > For more information see this [mailing list thread|http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-January/thread.html#38243]. > This commit will likely be done, making our unmapping efforts no longer working. Alan Bateman is aware of this issue and will open a new issue at OpenJDK to allow forceful unmapping without using the now private sun.misc.Cleaner. The idea is to let the internal class sun.misc.Cleaner implement the Runable interface, so we can simply cast to runable and call the run() method to unmap. The code would then work. This will lead to minor changes in our unmapper in MMapDirectory: An instanceof check and casting if possible. > I opened this issue to keep track and implement the changes as soon as possible, so people will have working unmapping when java 9 comes out. Current Lucene versions will no longer work with Java 9. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org