Skip to content

Commit

Permalink
remove extant sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
nginthfs committed Sep 16, 2024
1 parent 107dc4f commit c07bead
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ private static class FileSizeMap implements Accountable {

public Sizes add(String name, Sizes sizes) {
Sizes extant = fileSizeMap.put(name, sizes);
if (extant != null) {
onDiskSize.add(-extant.onDiskSize);
}
onDiskSize.add(sizes.onDiskSize);
return extant;
}
Expand All @@ -96,7 +99,7 @@ public Sizes get(String key) {
return fileSizeMap.get(key);
}

public long size() {
public int size() {
return fileSizeMap.size();
}

Expand Down

0 comments on commit c07bead

Please sign in to comment.