[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:
HappenLee
2021-04-30 10:12:18 +08:00
committed by GitHub
parent 8ff87409cb
commit 6ad1bf7d7e
3 changed files with 8 additions and 6 deletions

View File

@ -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;
}

View File

@ -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);
}