ArafatKhan2198 commented on code in PR #5100:
URL: https://github.com/apache/ozone/pull/5100#discussion_r1270510435
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/OmTableInsightTask.java:
##########
@@ -376,11 +376,36 @@ private void handleUpdateEvent(OMDBUpdateEvent<String,
Object> event,
String countKey = getTableCountKeyFromTable(tableName);
String unReplicatedSizeKey = getUnReplicatedSizeKeyFromTable(tableName);
String replicatedSizeKey = getReplicatedSizeKeyFromTable(tableName);
- // In Update event the count for the table will not change. So we don't
+
+ if (event.getValue() != null) {
+ if (sizeRelatedTables.contains(tableName)) {
+ // Handle update for only size related tables
+ handleSizeRelatedTableUpdateEvent(event, countKey, unReplicatedSizeKey,
Review Comment:
Yes, you are correct. In the **`handleUpdateEvent`** method, the code checks
if the **`event.getValue()`** is not null before proceeding with further
processing. This check is essential because we require a new value to replace
the old one during the update process. If the new value is null, we cannot
perform the update, as it wouldn't have any meaningful data to apply for the
update operation.
--
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]