[Bug] Fix dead lock in olap scan node and refactor some code in FE profile (#5713)
* [Bug] Fix dead lock in olap scan node and refactor some code in FE profile * Add some comment
This commit is contained in:
@ -344,15 +344,15 @@ public class RuntimeProfile {
|
||||
// Because the profile of summary and child fragment is not a real parent-child relationship
|
||||
// Each child profile needs to calculate the time proportion consumed by itself
|
||||
public void computeTimeInChildProfile() {
|
||||
childMap.values().stream().
|
||||
forEach(child -> child.computeTimeInProfile());
|
||||
childMap.values().
|
||||
forEach(RuntimeProfile::computeTimeInProfile);
|
||||
}
|
||||
|
||||
public void computeTimeInProfile() {
|
||||
computeTimeInProfile(this.counterTotalTime.getValue());
|
||||
}
|
||||
|
||||
public void computeTimeInProfile(long total) {
|
||||
private void computeTimeInProfile(long total) {
|
||||
if (total == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -416,8 +416,6 @@ public class StmtExecutor {
|
||||
private void writeProfile() {
|
||||
initProfile(plannerProfile);
|
||||
profile.computeTimeInChildProfile();
|
||||
StringBuilder builder = new StringBuilder();
|
||||
profile.prettyPrint(builder, "");
|
||||
ProfileManager.getInstance().pushProfile(profile);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user