[Fix](autobucket) Fix autobucket partition size by using getAllDataSize including cooldown size (#23557)

This commit is contained in:
Jack Drogon
2023-08-28 15:24:48 +08:00
committed by GitHub
parent 6e82178847
commit f70638e895
2 changed files with 6 additions and 1 deletions

View File

@ -253,6 +253,11 @@ public class Partition extends MetaObject implements Writable {
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)) {

View File

@ -210,7 +210,7 @@ public class DynamicPartitionScheduler extends MasterDaemon {
ArrayList<Long> partitionSizeArray = Lists.newArrayList();
for (Partition partition : partitions) {
if (partition.getVisibleVersion() >= 2) {
partitionSizeArray.add(partition.getDataSize());
partitionSizeArray.add(partition.getAllDataSize());
}
}