Enable unmap hack for java 9
This commit is contained in:
parent
82d01e4315
commit
a0191dff01
|
@ -33,7 +33,10 @@ grant codeBase "${codebase.securesm-1.0.jar}" {
|
|||
|
||||
grant codeBase "${codebase.lucene-core-6.0.0-snapshot-bea235f.jar}" {
|
||||
// needed to allow MMapDirectory's "unmap hack" (die unmap hack, die)
|
||||
// java 8 package
|
||||
permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";
|
||||
// java 9 "package"
|
||||
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.ref";
|
||||
permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
|
||||
// NOTE: also needed for RAMUsageEstimator size calculations
|
||||
permission java.lang.RuntimePermission "accessDeclaredMembers";
|
||||
|
|
|
@ -109,7 +109,12 @@ public class PrimaryAllocationIT extends ESIntegTestCase {
|
|||
logger.info("--> check that old primary shard does not get promoted to primary again");
|
||||
// kick reroute and wait for all shard states to be fetched
|
||||
client(master).admin().cluster().prepareReroute().get();
|
||||
assertBusy(() -> assertThat(internalCluster().getInstance(GatewayAllocator.class, master).getNumberOfInFlightFetch(), equalTo(0)));
|
||||
assertBusy(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
assertThat(internalCluster().getInstance(GatewayAllocator.class, master).getNumberOfInFlightFetch(), equalTo(0));
|
||||
}
|
||||
});
|
||||
// kick reroute a second time and check that all shards are unassigned
|
||||
assertThat(client(master).admin().cluster().prepareReroute().get().getState().getRoutingNodes().unassigned().size(), equalTo(2));
|
||||
}
|
||||
|
|
|
@ -364,6 +364,6 @@ public class LuceneTests extends ESTestCase {
|
|||
*/
|
||||
public void testMMapHackSupported() throws Exception {
|
||||
// add assume's here if needed for certain platforms, but we should know if it does not work.
|
||||
assertTrue(MMapDirectory.UNMAP_SUPPORTED);
|
||||
assertTrue("MMapDirectory does not support unmapping: " + MMapDirectory.UNMAP_NOT_SUPPORTED_REASON, MMapDirectory.UNMAP_SUPPORTED);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue