hemantk-12 commented on code in PR #7474:
URL: https://github.com/apache/ozone/pull/7474#discussion_r2029317494
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java:
##########
@@ -1505,25 +1509,18 @@ public void
reconcileContainer(DNContainerOperationClient dnClient, Container<?>
KeyValueContainerData containerData = (KeyValueContainerData)
container.getContainerData();
Optional<ContainerProtos.ContainerChecksumInfo> optionalChecksumInfo =
checksumManager.read(containerData);
long oldDataChecksum = 0;
- long dataChecksum = 0;
ContainerProtos.ContainerChecksumInfo checksumInfo;
if (optionalChecksumInfo.isPresent()) {
checksumInfo = optionalChecksumInfo.get();
- oldDataChecksum =
checksumInfo.getContainerMerkleTree().getDataChecksum();
} else {
// Try creating the checksum info from RocksDB metadata if it is not
present.
- optionalChecksumInfo = createContainerMerkleTree(container);
- if (!optionalChecksumInfo.isPresent()) {
- throw new StorageContainerException("Failed to reconcile container " +
containerData.getContainerID()
- + " as checksum info is not available", CONTAINER_CHECKSUM_ERROR);
- }
- checksumInfo = optionalChecksumInfo.get();
- oldDataChecksum =
checksumInfo.getContainerMerkleTree().getDataChecksum();
+ checksumInfo = updateAndGetContainerChecksum(containerData);
}
+ oldDataChecksum = checksumInfo.getContainerMerkleTree().getDataChecksum();
Review Comment:
```suggestion
long oldDataChecksum =
checksumInfo.getContainerMerkleTree().getDataChecksum();
```
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java:
##########
@@ -1505,25 +1509,18 @@ public void
reconcileContainer(DNContainerOperationClient dnClient, Container<?>
KeyValueContainerData containerData = (KeyValueContainerData)
container.getContainerData();
Optional<ContainerProtos.ContainerChecksumInfo> optionalChecksumInfo =
checksumManager.read(containerData);
long oldDataChecksum = 0;
Review Comment:
```suggestion
```
--
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]