devmadhuu commented on code in PR #4406:
URL: https://github.com/apache/ozone/pull/4406#discussion_r1138231284
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ClusterStateEndpoint.java:
##########
@@ -127,13 +131,19 @@ public Response getClusterState() {
}
Long totalKeys = 0L;
+ Long deletedKeys = 0L;
+
if (keyRecord != null) {
totalKeys += keyRecord.getValue();
}
if (fileRecord != null) {
totalKeys += fileRecord.getValue();
}
+ if (deletedKeyRecord != null) {
+ deletedKeys += deletedKeyRecord.getValue();
+ }
builder.setKeys(totalKeys);
Review Comment:
I think , same holds true for container count. What if all keys mapped to a
container are deleted, then container count also should reflect the true count.
Though it is a soft delete, but when keys will be deleted, then I believe they
will add an entry to deletedTable and key reference would have removed from
keyTable.
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ClusterStateEndpoint.java:
##########
@@ -127,13 +131,19 @@ public Response getClusterState() {
}
Long totalKeys = 0L;
+ Long deletedKeys = 0L;
+
if (keyRecord != null) {
totalKeys += keyRecord.getValue();
}
if (fileRecord != null) {
totalKeys += fileRecord.getValue();
}
+ if (deletedKeyRecord != null) {
+ deletedKeys += deletedKeyRecord.getValue();
+ }
builder.setKeys(totalKeys);
Review Comment:
I think this needs to be corrected here. If keys moved to deleted table,
then actual total number of keys should also be updated.
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ClusterStateEndpoint.java:
##########
@@ -127,13 +131,19 @@ public Response getClusterState() {
}
Long totalKeys = 0L;
+ Long deletedKeys = 0L;
+
if (keyRecord != null) {
totalKeys += keyRecord.getValue();
}
if (fileRecord != null) {
totalKeys += fileRecord.getValue();
}
+ if (deletedKeyRecord != null) {
+ deletedKeys += deletedKeyRecord.getValue();
+ }
builder.setKeys(totalKeys);
Review Comment:
Also I think the keys shown on overview page is now support FSO bucket keys
as well, so check for FSO bucket keys as well.
Its good we can refer deletedDirectoryTable also to find out the number of
file paths deleted or no longed referenced.
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/ClusterStateEndpoint.java:
##########
@@ -127,13 +131,19 @@ public Response getClusterState() {
}
Long totalKeys = 0L;
+ Long deletedKeys = 0L;
+
if (keyRecord != null) {
totalKeys += keyRecord.getValue();
}
if (fileRecord != null) {
totalKeys += fileRecord.getValue();
}
+ if (deletedKeyRecord != null) {
+ deletedKeys += deletedKeyRecord.getValue();
+ }
builder.setKeys(totalKeys);
Review Comment:
IMO, we should just update Overview page data like number of deleted keys in
case of LEGACY/OBS buckets and number of deleted paths in case of FSO buckets.
Details of those keys can be shown and done in new requirement where I am
working currently on design for OM DB Insights and SCM DB insights page.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]