errose28 commented on PR #7930: URL: https://github.com/apache/ozone/pull/7930#issuecomment-2683880644
@ChenSammi I've reviewed the code in context with your [comment](https://issues.apache.org/jira/browse/HDDS-6611?focusedCommentId=17928393&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17928393) on the jira and I still do not think this requires a schema version. Actually the change should be much simpler without it: - For new containers, don't write the values to the yaml - For old containers, ignore the existing values except during hash calculation, where we will load all yaml fields. Checking usages of `OzoneConsts#SCHEMA_v4` we see most uses are boilerplate for adding a new schema in general. The places making decisions based on schema version are: - container import - I don't see any advantage to migrating old containers on import. If we are finalized we can simply ignore the fields if they are present. - container file rewrite - Same as above, I do not think we should be doing migration here. - Yaml hash calculation - We can check if the path fields are present to make the same decisions without needing to check a schema version. This is already done in the current patch in `ContainerDataYaml#readContainerFile`. -- 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]
