Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public void decrUsedBytes(long bytes, boolean increasePendingDeleteBytes) {
}
}

private void incrSnapshotUsedBytes(long bytes) {
public void incrSnapshotUsedBytes(long bytes) {
this.snapshotUsedBytes += bytes;
}

Expand All @@ -275,7 +275,7 @@ public void decrUsedNamespace(long namespaceToUse, boolean increasePendingDelete
}
}

private void incrSnapshotUsedNamespace(long namespaceToUse) {
public void incrSnapshotUsedNamespace(long namespaceToUse) {
this.snapshotUsedNamespace += namespaceToUse;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2358,6 +2358,8 @@ message BucketQuotaCount {
required int64 diffUsedBytes = 3;
required int64 diffUsedNamespace = 4;
required bool supportOldQuota = 5 [default=false];
optional int64 diffSnapshotUsedBytes = 6;
optional int64 diffSnapshotUsedNamespace = 7;
}

message QuotaRepairResponse {
Expand Down
12 changes: 12 additions & 0 deletions hadoop-ozone/interface-client/src/main/resources/proto.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8213,6 +8213,18 @@
"value": "false"
}
]
},
{
"id": 6,
"name": "diffSnapshotUsedBytes",
"type": "int64",
"optional": true
},
{
"id": 7,
"name": "diffSnapshotUsedNamespace",
"type": "int64",
"optional": true
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ private void updateBucketInfo(
}
bucketInfo.incrUsedBytes(bucketCountInfo.getDiffUsedBytes());
bucketInfo.incrUsedNamespace(bucketCountInfo.getDiffUsedNamespace());
if (bucketCountInfo.hasDiffSnapshotUsedBytes()) {
bucketInfo.incrSnapshotUsedBytes(bucketCountInfo.getDiffSnapshotUsedBytes());
}
if (bucketCountInfo.hasDiffSnapshotUsedNamespace()) {
bucketInfo.incrSnapshotUsedNamespace(bucketCountInfo.getDiffSnapshotUsedNamespace());
}
if (bucketCountInfo.getSupportOldQuota()) {
OmBucketInfo.Builder builder = bucketInfo.toBuilder();
if (bucketInfo.getQuotaInBytes() == OLD_QUOTA_DEFAULT) {
Expand Down
Loading