-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Enhancement] Fix Profile collect bug when log dir is removed #51027
[Enhancement] Fix Profile collect bug when log dir is removed #51027
Conversation
Signed-off-by: gengjun-git <[email protected]>
@Mergifyio rebase |
✅ Branch has been successfully rebased |
c24dfac
to
2a63987
Compare
initialized = true; | ||
} | ||
File file = new File(profileLogDir); | ||
file.mkdirs(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check first? no need to mkdir every time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is check in mkdirs()
public boolean mkdirs() {
if (exists()) {
return false;
}
if (mkdir()) {
return true;
}
File canonFile = null;
try {
canonFile = getCanonicalFile();
} catch (IOException e) {
return false;
}
File parent = canonFile.getParentFile();
return (parent != null && (parent.mkdirs() || parent.exists()) &&
canonFile.mkdir());
}
Signed-off-by: gengjun-git <[email protected]>
2a63987
to
a9b03d5
Compare
Quality Gate failedFailed conditions See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]✅ pass : 23 / 28 (82.14%) file detail
|
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
@Mergifyio backport branch-3.3 |
@Mergifyio backport branch-3.2 |
@Mergifyio backport branch-3.1 |
✅ Backports have been created
|
✅ Backports have been created
|
✅ Backports have been created
|
Fixes ``` 2024-09-13 20:44:20.822+08:00 ERROR (ProcProfileCollector|72) [Daemon.run():109] daemon thread got exception. name: ProcProfileCollector java.lang.NullPointerException: null at com.starrocks.memory.ProcProfileCollector.deleteExpiredFiles(ProcProfileCollector.java:178) ~[starrocks-fe.jar:?] at com.starrocks.memory.ProcProfileCollector.runAfterCatalogReady(ProcProfileCollector.java:75) ~[starrocks-fe.jar:?] at com.starrocks.common.util.FrontendDaemon.runOneCycle(FrontendDaemon.java:72) ~[starrocks-fe.jar:?] at com.starrocks.common.util.Daemon.run(Daemon.java:107) ~[starrocks-fe.jar:?] ``` Signed-off-by: gengjun-git <[email protected]> (cherry picked from commit 598c81c)
Fixes ``` 2024-09-13 20:44:20.822+08:00 ERROR (ProcProfileCollector|72) [Daemon.run():109] daemon thread got exception. name: ProcProfileCollector java.lang.NullPointerException: null at com.starrocks.memory.ProcProfileCollector.deleteExpiredFiles(ProcProfileCollector.java:178) ~[starrocks-fe.jar:?] at com.starrocks.memory.ProcProfileCollector.runAfterCatalogReady(ProcProfileCollector.java:75) ~[starrocks-fe.jar:?] at com.starrocks.common.util.FrontendDaemon.runOneCycle(FrontendDaemon.java:72) ~[starrocks-fe.jar:?] at com.starrocks.common.util.Daemon.run(Daemon.java:107) ~[starrocks-fe.jar:?] ``` Signed-off-by: gengjun-git <[email protected]> (cherry picked from commit 598c81c)
Fixes ``` 2024-09-13 20:44:20.822+08:00 ERROR (ProcProfileCollector|72) [Daemon.run():109] daemon thread got exception. name: ProcProfileCollector java.lang.NullPointerException: null at com.starrocks.memory.ProcProfileCollector.deleteExpiredFiles(ProcProfileCollector.java:178) ~[starrocks-fe.jar:?] at com.starrocks.memory.ProcProfileCollector.runAfterCatalogReady(ProcProfileCollector.java:75) ~[starrocks-fe.jar:?] at com.starrocks.common.util.FrontendDaemon.runOneCycle(FrontendDaemon.java:72) ~[starrocks-fe.jar:?] at com.starrocks.common.util.Daemon.run(Daemon.java:107) ~[starrocks-fe.jar:?] ``` Signed-off-by: gengjun-git <[email protected]> (cherry picked from commit 598c81c)
#51027) (#51260) Co-authored-by: gengjun-git <[email protected]>
#51027) (#51259) Co-authored-by: gengjun-git <[email protected]>
#51027) (#51257) Co-authored-by: gengjun-git <[email protected]>
…cks#51027) Fixes ``` 2024-09-13 20:44:20.822+08:00 ERROR (ProcProfileCollector|72) [Daemon.run():109] daemon thread got exception. name: ProcProfileCollector java.lang.NullPointerException: null at com.starrocks.memory.ProcProfileCollector.deleteExpiredFiles(ProcProfileCollector.java:178) ~[starrocks-fe.jar:?] at com.starrocks.memory.ProcProfileCollector.runAfterCatalogReady(ProcProfileCollector.java:75) ~[starrocks-fe.jar:?] at com.starrocks.common.util.FrontendDaemon.runOneCycle(FrontendDaemon.java:72) ~[starrocks-fe.jar:?] at com.starrocks.common.util.Daemon.run(Daemon.java:107) ~[starrocks-fe.jar:?] ``` Signed-off-by: gengjun-git <[email protected]> Signed-off-by: zhiminr.ren <[email protected]>
Why I'm doing:
What I'm doing:
Fixes
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: