sumitagrawl commented on code in PR #6640:
URL: https://github.com/apache/ozone/pull/6640#discussion_r1595586813
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/spi/impl/OzoneManagerServiceProviderImpl.java:
##########
@@ -366,6 +374,14 @@ connectionFactory, getOzoneManagerSnapshotUrl(),
reconUtils.untarCheckpointFile(targetFile, untarredDbDir);
FileUtils.deleteQuietly(targetFile);
+ // Validate the presence of required SST files
+ File[] sstFiles = untarredDbDir.toFile().listFiles((dir, name) ->
name.endsWith(".sst"));
+ if (sstFiles == null || sstFiles.length == 0) {
+ LOG.warn("No SST files found in the OM snapshot directory: {}",
untarredDbDir);
+ return null;
+ }
+ LOG.info("Valid OM snapshot with SST files found at: {}", untarredDbDir);
Review Comment:
IMO, Recon keeps fetching partial updated from OM, we can have a test over
live system with on-going regular updates.
--
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]