Commit 19ed22e 1 parent f527cfc commit 19ed22e Copy full SHA for 19ed22e
File tree 2 files changed +17
-0
lines changed
2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -920,6 +920,11 @@ public static void main( String[] args ) {
920
920
Log .info ("Opted out of sending usage metrics." );
921
921
}
922
922
923
+ if (OPT_ARGS .no_ice ) {
924
+ // Cleaner callback happens in a different classloader. Do this so they can share the state info.
925
+ System .setProperty ("h2o.args.no_ice" , "true" );
926
+ }
927
+
923
928
if (OPT_ARGS .baseport != 0 ) {
924
929
DEFAULT_PORT = OPT_ARGS .baseport ;
925
930
}
@@ -1612,11 +1617,19 @@ static boolean lazyPersist(){ // free disk > our DRAM?
1612
1617
return !H2O .OPT_ARGS .no_ice && H2O .SELF ._heartbeat .get_free_disk () > MemoryManager .MEM_MAX ;
1613
1618
}
1614
1619
static boolean isDiskFull (){ // free disk space < 5K?
1620
+ if (H2O .OPT_ARGS .no_ice ) {
1621
+ return true ;
1622
+ }
1623
+
1615
1624
long space = Persist .getIce ().getUsableSpace ();
1616
1625
return space != Persist .UNKNOWN && space < (5 << 10 );
1617
1626
}
1618
1627
1619
1628
@ Override public void run () {
1629
+ if (H2O .OPT_ARGS .no_ice ) {
1630
+ return ;
1631
+ }
1632
+
1620
1633
boolean diskFull = false ;
1621
1634
while ( true ) {
1622
1635
// Sweep the K/V store, writing out Values (cleaning) and free'ing
Original file line number Diff line number Diff line change @@ -200,6 +200,10 @@ private static class HeapUsageMonitor implements javax.management.NotificationLi
200
200
* Limit to touching global vars in the Boot class.
201
201
*/
202
202
public void handleNotification (Notification notification , Object handback ) {
203
+ if (System .getProperty ("h2o.args.no_ice" ) != null ) {
204
+ return ;
205
+ }
206
+
203
207
String notifType = notification .getType ();
204
208
if ( notifType .equals (MemoryNotificationInfo .MEMORY_COLLECTION_THRESHOLD_EXCEEDED )) {
205
209
// Memory used after this FullGC
You can’t perform that action at this time.
0 commit comments