From dev-return-47194-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Mon Aug 26 12:57:47 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 4D8EB180645 for ; Mon, 26 Aug 2019 14:57:47 +0200 (CEST) Received: (qmail 30882 invoked by uid 500); 26 Aug 2019 12:57:46 -0000 Mailing-List: contact dev-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list dev@ignite.apache.org Received: (qmail 30871 invoked by uid 99); 26 Aug 2019 12:57:46 -0000 Received: from Unknown (HELO mailrelay1-lw-us.apache.org) (10.10.3.159) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Aug 2019 12:57:46 +0000 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by mailrelay1-lw-us.apache.org (ASF Mail Server at mailrelay1-lw-us.apache.org) with ESMTPSA id 4B9345918 for ; Mon, 26 Aug 2019 12:57:46 +0000 (UTC) Received: by mail-wm1-f44.google.com with SMTP id 10so15359027wmp.3 for ; Mon, 26 Aug 2019 05:57:46 -0700 (PDT) X-Gm-Message-State: APjAAAWP03SaLGRaAzkwteQpwfhrbxWnjHNANJOyWiUPxyeovGpEJ8mQ TMKELKoz7Wy26xqNW9IoyEaOJ9x+W4kWivujvo0= X-Google-Smtp-Source: APXvYqxxV3y0aXMz9Rlc93UBhtI4X0XccL76lJfgjgXrhetSCB1nLs+LwlmXLxko70TEZZFNzAwFawko7sOh3D9KmBo= X-Received: by 2002:a05:600c:22d7:: with SMTP id 23mr22443738wmg.0.1566824265571; Mon, 26 Aug 2019 05:57:45 -0700 (PDT) MIME-Version: 1.0 References: <7D872358-6BCF-44F4-9C4E-F5481B7054EA@gmail.com> <4cae6d5a-56c4-43f1-8e59-de65e2ebf8ee@Spark> In-Reply-To: From: Dmitriy Pavlov Date: Mon, 26 Aug 2019 15:57:34 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Do I have to use --illegal-access=permit for Java thin client and JDBC with JDK 9/10/11. To: dev Content-Type: multipart/alternative; boundary="000000000000c6651f059104b3cd" --000000000000c6651f059104b3cd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Alex, Would it be reasonable to migrate exports to --add-opens? Thin clients don't use Unsafe, so --illegal-access=3Ddeny has no effect. --illegal-acess=3Dpertmit is also well known that it is a default value. I guess it was added to compensate future Java defaults changes from permit to deny. We can save one more release if Ignite will work on a future release of Java, where `permit` is not default. Sincerely, Dmitriy Pavlov =D0=BF=D0=BD, 26 =D0=B0=D0=B2=D0=B3. 2019 =D0=B3. =D0=B2 15:51, Alex Plehan= ov : > Denis, > > I've tried Oracle JDK 11 and OpenJDK 12 with Ignite 2.7.5, looks like: > "--add-exports=3Djava.base/jdk.internal.misc=3DALL-UNNAMED" > Is enough for running java thin client. > Also, adding: > "--add-opens=3Djava.base/java.nio=3DALL-UNNAMED" > Eliminates all warnings about illegal access (with > "--illegal-access=3Dpermit" warnings are still shown) > > About "--illegal-access=3Dpermit" flag, AFAIK this is the default value f= or > currently released java versions (11, 12). But with option > "--add-opens=3Djava.base/java.nio=3DALL-UNNAMED" thin client also works e= ven if > "--illegal-access=3Ddeny" is set. > > =D0=BF=D1=82, 23 =D0=B0=D0=B2=D0=B3. 2019 =D0=B3. =D0=B2 19:44, Denis Ma= gda : > > > Hmm, looks like we need to provide some VM options for the thin clients > as > > well. > > > > Alex, would you mind checking and sharing a full subset of such options > for > > the thin clients? I'll update the docs. > > > > - > > Denis > > > > > > On Fri, Aug 23, 2019 at 9:23 AM Alex Plehanov > > wrote: > > > > > Denis, > > > > > > Thin client uses BinaryHeapOutputStream, which uses Unsafe. I've got > some > > > warnings when I run thin client with --illegal-access=3Ddebug flag, f= or > > > example: > > > > > > WARNING: Illegal reflective access by > > > org.apache.ignite.internal.util.GridUnsafe$2 > > > (file:/D:/Work/Projects/ignite/modules/core/target/classes/) to field > > > java.nio.Buffer.address > > > at > org.apache.ignite.internal.util.GridUnsafe$2.run(GridUnsafe.java:1536) > > > at > org.apache.ignite.internal.util.GridUnsafe$2.run(GridUnsafe.java:1531) > > > at > > > > > > > > > java.base/java.security.AccessController.doPrivileged(AccessController.ja= va:310) > > > at > > > > > > > > > org.apache.ignite.internal.util.GridUnsafe.bufferAddressOffset(GridUnsafe= .java:1531) > > > at > > org.apache.ignite.internal.util.GridUnsafe.(GridUnsafe.java:106= ) > > > at > > > > > > > > > org.apache.ignite.internal.binary.streams.BinaryHeapOutputStream.writeInt= Fast(BinaryHeapOutputStream.java:122) > > > at > > > > > > > > > org.apache.ignite.internal.binary.streams.BinaryAbstractOutputStream.writ= eInt(BinaryAbstractOutputStream.java:123) > > > > > > > > > =D1=87=D1=82, 22 =D0=B0=D0=B2=D0=B3. 2019 =D0=B3. =D0=B2 23:43, Denis= Magda : > > > > > > > Ok, I updated the docs saying that > > > > > > > > "4. Add the following VM options to your Java applications. That's > not > > > > needed if you use Java thin clients or Ignite JDBC." > > > > > > > > > > > > > > https://apacheignite.readme.io/docs/getting-started#section-running-ignit= e-with-java-9-10-11 > > > > > > > > - > > > > Denis > > > > > > > > > > > > On Thu, Aug 22, 2019 at 9:30 AM Denis Mekhanikov < > > dmekhanikov@gmail.com> > > > > wrote: > > > > > > > > > Denis, > > > > > > > > > > I didn=E2=80=99t find any usages of JDK internals in the implemen= tation of > > the > > > > > thin clients. > > > > > It would be nice to verify in tests that thin clients can work > > without > > > > > these flags. > > > > > > > > > > Do our Java 9/10/11 tests include thin client testing? If so, do > > these > > > > > tests include these flags? > > > > > > > > > > Denis > > > > > On 15 Aug 2019, 11:09 +0300, Denis Magda , > wrote: > > > > > > Denis, > > > > > > > > > > > > Does it mean we don't need to pass any flags from this list [1] > at > > > all > > > > > for > > > > > > the JDBC and thin clients? > > > > > > > > > > > > [1] > > > > > > > > > > > > > > > > > > > > > https://apacheignite.readme.io/docs/getting-started#section-running-ignit= e-with-java-9-10-11 > > > > > > > > > > > > - > > > > > > Denis > > > > > > > > > > > > > > > > > > On Wed, Aug 14, 2019 at 5:56 PM Denis Mekhanikov < > > > > dmekhanikov@gmail.com> > > > > > > wrote: > > > > > > > > > > > > > Hi! > > > > > > > > > > > > > > There are two JDK internal things that are used by Ignite: > Unsafe > > > and > > > > > > > sun.nio.ch package. > > > > > > > None of these things are used by thin clients. So, it=E2=80= =99s fine to > > use > > > > > thin > > > > > > > clients without additional flags. > > > > > > > > > > > > > > Denis > > > > > > > > > > > > > > > On 13 Aug 2019, at 23:01, Shane Duan > > > wrote: > > > > > > > > > > > > > > > > Hi Igniter, > > > > > > > > > > > > > > > > I understand that --illegal-access=3Dpermit is required for= JDK > > > > > 9/10/11 on > > > > > > > > Ignite server. But do I have to include this JVM parameter > for > > > > Ignite > > > > > > > Java > > > > > > > > thin client and JDBC client? I tried some simple test witho= ut > > it > > > > and > > > > > it > > > > > > > > seems working fine... > > > > > > > > > > > > > > > > > > > > > > > > Thanks, > > > > > > > > Shane > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --000000000000c6651f059104b3cd--