Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes issue AIX and OSMBean getFreePhysicalMemorySize #16065

Conversation

@pveentjer
Copy link
Member

pveentjer commented Nov 20, 2019

A flag is added to supress retrieving this value. On AIX there
is one customer that runs into multi seconds execution times
for this method.

Backport of #16039

@pveentjer pveentjer added this to the 3.12.5 milestone Nov 20, 2019
@pveentjer pveentjer requested review from vbekiaris and blazember Nov 20, 2019
@pveentjer pveentjer force-pushed the pveentjer:v3.12.5/fix/getFreePhysicalMemorySize branch from 811dc11 to 4e80471 Nov 20, 2019
@mmedenjak

This comment has been minimized.

Copy link
Contributor

mmedenjak commented Nov 21, 2019

run-lab-run

@pveentjer

This comment has been minimized.

Copy link
Member Author

pveentjer commented Nov 21, 2019

I'm running in a very strange test failure.

It has to do with the public access modifier. In the current code, this test will always run in an IllegalAccessException and then the default value is returned.

In 4.0 the same code doesn't run into an IllegalAccessException; so everything is working fine.

This in itself is already very strange because I'm using exactly the same JVM.

The other thing that is strange is that if I remove the checks, and unconditionally make the method public, the test works fine.

    // the method is public in Java 9
           // if (!Modifier.isPublic(method.getModifiers())) {
                method.setAccessible(true);
           // }

So apparently the method isn't public because making it public, makes the code work. But if I ask if the method is public, it already says.. yes I'm public.

@pveentjer pveentjer force-pushed the pveentjer:v3.12.5/fix/getFreePhysicalMemorySize branch from 4e80471 to 1364c24 Nov 21, 2019
@pveentjer

This comment has been minimized.

Copy link
Member Author

pveentjer commented Nov 22, 2019

verify

A flag is added to supress retrieving this value. On AIX there
is one customer that runs into multi seconds execution times
for this method.
@pveentjer pveentjer force-pushed the pveentjer:v3.12.5/fix/getFreePhysicalMemorySize branch from 1364c24 to 98e2555 Nov 22, 2019
@pveentjer pveentjer merged commit f9c7665 into hazelcast:maintenance-3.x Nov 25, 2019
1 check passed
1 check passed
default Test PASSed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.