Add diskUnderWarnThreshold check event to prevent gcThread suspended forever
Motivation
This code snippet implements disk check event trigger if disk usage is above warnThreshold, either marjor is suspend or forcegc is enabled.
There exists a case that if usgae descends to warn threshold, the gc thread is suspend forever. until it goes to full and becomes writable again.
@Override
public void diskAlmostFull(File disk) {
if (gcThread.isForceGCAllowWhenNoSpace) {
gcThread.enableForceGC();
} else {
gcThread.suspendMajorGC();
}
}
Changes
Add diskUnderWarnThreshold check event to prevent gcThread supended forever
Would you please add a test to protect the case you described?
@gaozhangmin @hangc0276 done, PTAL again
rerun failure checks
rerun failure checks
rerun failure checks
rerun failure checks