ari-ban / issue-test

0 stars 0 forks source link

Set the 'force-selector-spin-detection' to true by default for Linux OSs #1967

Closed arinban closed 6 years ago

arinban commented 7 years ago

Discussion about issue here - https://javaee.groups.io/g/grizzly/topic/5807706

The org.glassfish.grizzly.nio.DefaultSelectorHandler.force-selector-spin-detection JVM parameter defaults to false unless the OS is Linux and the JDK is 1.6 or lower. I propose that this be set to true on Linux regardless of the JDK version as the bug is still observed on 1.7 and higher if the kernel is an older version.

public static final boolean IS_WORKAROUND_SELECTOR_SPIN = 
    Boolean.getBoolean(DefaultSelectorHandler.class.getName() + ".force-selector-spin-detection") || 
    System.getProperty("os.name").equalsIgnoreCase("linux");
     // && JdkVersion.getJdkVersion().compareTo("1.7.0") < 0;  <-- remove this check
arinban commented 6 years ago