sumitagrawl commented on code in PR #7583: URL: https://github.com/apache/ozone/pull/7583#discussion_r2052285466
########## hadoop-hdds/docs/content/design/leader-execution/obs-locking.md: ########## @@ -0,0 +1,97 @@ +--- +title: Ozone Granular locking for OBS bucket +summary: Granular locking for OBS bucket +date: 2025-01-06 +jira: HDDS-11898 +status: draft +author: Sumit Agrawal +--- +<!-- + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. See accompanying LICENSE file. +--> + +# OBS locking + +OBS case just involves volume, bucket and key. So this is more simplified in terms of locking. + +There will be: +1. Volume Strip Lock: locking for volume +2. Bucket Strip Lock: locking for bucket +3. Key Strip Lock: Locking for key + +**Note**: Multiple keys locking (like delete multiple keys or rename operation), lock needs to be taken in order, i.e. using StrippedLocking order to avoid deadlock. + +Stripped locking ordering: +- Strip lock is obtained over a hash bucket. +- All keys needs to be ordered with hash bucket +- And then need take lock in sequence order Review Comment: Updated the doc separating the striped lock behavior with obs locking. -- 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: issues-unsubscr...@ozone.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org For additional commands, e-mail: issues-h...@ozone.apache.org