devmadhuu commented on PR #7743: URL: https://github.com/apache/ozone/pull/7743#issuecomment-2619334269
> Thanks for this improvement @devmadhuu! Please take a look at my comments, overall my question is that shouldn't we initialise these in the constructor? > > ``` > private Collection<String> tables; > private HashMap<String, Long> objectCountMap; > private HashMap<String, Long> unReplicatedSizeMap; > private HashMap<String, Long> replicatedSizeMap; > ``` In restart or upgrade case it is ok to initialise them in constructor because recon OM DB will already be there and `tables` list will be initialised, but in fresh installation of Recon, it will need OM full snapshot and then populate `tables` list, and initialising maps needs SQL tables as well as OM tables list, else it will fail. So it is safe to be initialised and populated once with full snapshot in `reprocess` method. -- 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]
