fapifta commented on pull request #2814: URL: https://github.com/apache/ozone/pull/2814#issuecomment-964667502
Hmm, looking into it further, that perf impact might be huge, as if we do a getVolumeInfo first, then a getBucketInfo based on the volume, and if we use this in almost all operations as we do now, then that is a burden we do not want to take on for sure. So even though the other solution for me seems easier to understand, it hurts with the performance tradeoff... If we are concerned about compatibility, we need to use getBucketDetails(vol, buck) in the initial try catch, as otherwise, we are causing performance degradation of a lot of unrelated calls, but if we do not want to change the behaviour of BucketManager, we need to change how we handle errors, and there get volume first, and create only if it does not exist I believe... On the other hand, I would leave the change of BucketManager still on the table, as if volume does not exists, it would be the correct behaviour to throw a volume not found, instead of the bucket not found or any other resultcode in the OMException. If you check, createBucket already does it this way, and if getBucketInfo(vol, buck) switches to this behaviour, your solution is the one I would vote for... -- 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]
