Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add diskUnderWarnThreshold check event to prevent gcThread suspended forever #4018

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

gaozhangmin
Copy link
Contributor

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

Copy link
Contributor

@hangc0276 hangc0276 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@gaozhangmin
Copy link
Contributor Author

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

@gaozhangmin @hangc0276 done, PTAL again

@gaozhangmin
Copy link
Contributor Author

rerun failure checks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants