Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: gengjun-git <[email protected]>
  • Loading branch information
gengjun-git committed Aug 30, 2024
1 parent 8066eb6 commit f9f3f09
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions fe/fe-core/src/main/java/com/starrocks/catalog/Database.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
Expand Down Expand Up @@ -753,6 +754,7 @@ public List<PhysicalPartition> getPartitionSamples() {
.stream()
.filter(table -> table instanceof OlapTable)
.map(table -> ((OlapTable) table).getPartitionSample())
.filter(Objects::nonNull)
.collect(Collectors.toList());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3525,6 +3525,10 @@ public int getPartitionsCount() {
}

public PhysicalPartition getPartitionSample() {
return idToPartition.values().iterator().next().getSubPartitions().iterator().next();
if (!idToPartition.isEmpty()) {
return idToPartition.values().iterator().next().getSubPartitions().iterator().next();
} else {
return null;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ private void initMemoryTracker() {
registerMemoryTracker("Task", currentState.getTaskManager());
registerMemoryTracker("Task", currentState.getTaskManager().getTaskRunManager());
registerMemoryTracker("TabletInvertedIndex", currentState.getTabletInvertedIndex());
registerMemoryTracker("LocalMetastore", currentState.getLocalMetastore());

registerMemoryTracker("Query", new QueryTracker());
registerMemoryTracker("Profile", ProfileManager.getInstance());
Expand Down

0 comments on commit f9f3f09

Please sign in to comment.