Skip to content

Commit

Permalink
[Fix](autobucket) Fix autobucket partition size by using getAllDataSi…
Browse files Browse the repository at this point in the history
…ze including cooldown size (#23557)
  • Loading branch information
JackDrogon authored Aug 28, 2023
1 parent 6e82178 commit f70638e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,11 @@ public List<MaterializedIndex> getMaterializedIndices(IndexExtState extState) {
return indices;
}

public long getAllDataSize() {
return getDataSize() + getRemoteDataSize();
}

// this is local data size
public long getDataSize() {
long dataSize = 0;
for (MaterializedIndex mIndex : getMaterializedIndices(IndexExtState.VISIBLE)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ private static int getBucketsNum(DynamicPartitionProperty property, OlapTable ta
ArrayList<Long> partitionSizeArray = Lists.newArrayList();
for (Partition partition : partitions) {
if (partition.getVisibleVersion() >= 2) {
partitionSizeArray.add(partition.getDataSize());
partitionSizeArray.add(partition.getAllDataSize());
}
}

Expand Down

0 comments on commit f70638e

Please sign in to comment.