fapifta commented on pull request #2083: URL: https://github.com/apache/ozone/pull/2083#issuecomment-824511794
I think both solution can be fine, but what we are essentially talking about is the following: - having one method with a couple of boolean flags as parameters, then some if conditions inside the method - or having two different methods that serves their own purpose. In this case this is a bit more complicated though, as we need to define proto messages and types in order to have different methods that serves their own purposes, so we have a lot of boilerplate here and there and with that the line of code overhead is way more bigger then just changing one proto message and add a few boolean flags, still I think it is cleaner, and I like it more. I don't have a strong opinion though, and I can accept the more flags version as well, if the internal API remains clear, and based on the flags we map to the desired methods that are living only in the server side. Even though, I don't have a strong opinion, we create precedent here, and my heart pulls me to the having different methods version, unless it has drawback I am ignorant of in the proto layer or regarding compatibility/perf or any other way more important stuff than code structure. -- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
