bookkeeper icon indicating copy to clipboard operation
bookkeeper copied to clipboard

Add diskUnderWarnThreshold check event to prevent gcThread suspended forever

Open gaozhangmin opened this issue 2 years ago • 5 comments

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

gaozhangmin avatar Jul 06 '23 12:07 gaozhangmin

Would you please add a test to protect the case you described?

@gaozhangmin @hangc0276 done, PTAL again

gaozhangmin avatar Jul 17 '23 08:07 gaozhangmin

rerun failure checks

gaozhangmin avatar Jul 17 '23 11:07 gaozhangmin

rerun failure checks

gaozhangmin avatar Jul 31 '25 08:07 gaozhangmin

rerun failure checks

gaozhangmin avatar Aug 11 '25 03:08 gaozhangmin

rerun failure checks

gaozhangmin avatar Aug 11 '25 03:08 gaozhangmin