You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Ivan Andika (Jira)" <ji...@apache.org> on 2025/09/12 11:08:00 UTC

[jira] [Commented] (HDDS-9388) OM Ratis Write: Move ACL check and Bucket resolution to preExecute

    [ https://issues.apache.org/jira/browse/HDDS-9388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18019820#comment-18019820 ] 

Ivan Andika commented on HDDS-9388:
-----------------------------------

Just FYI, doing rolling upgrade using this approach can cause OM DB inconsistencies between OM nodes for linked buckets.

Analysis
 * This patch moves the resolveBucketLink from validateAndUpdateCache (which will be run by all OM nodes) to preExecute (which only get called by the leader)
 * During an upgrade, there might be a situation where old OM leader receives an ALLOCATE_KEY request with link bucket and forward it directly to the new OM follower 
 * The new OM follower does not resolve the bucket link and incorrectly store the open key under the /link-volume/link-bucket instead of the /source-volume/source-bucket
 * When COMMIT_KEY is sent to the OM follower
 ** If the leader sending the COMMIT_KEY request is new version, it will resolve the bucket link and when OM follower check the openKeyTable for /source-volume/source-bucket path, it can't find one and therefore throw commit error exception
 ** If the leader sending the COMMIT_KEY request is a old version, it will not resolve the bucket link and OM follower will commit it under /link-volume/link-bucket
 *** This is arguably worse, since the key is silently committed, but will never be able to be accessed (since getKey will always resolve the bucket link) or even cleaned up (orphaned forever)

Since currently rolling upgrade is not supported in Ozone, this issue should not happen, but putting this out just in case some community members are doing some rolling upgrade to new version with this patch.

> OM Ratis Write: Move ACL check and Bucket resolution to preExecute
> ------------------------------------------------------------------
>
>                 Key: HDDS-9388
>                 URL: https://issues.apache.org/jira/browse/HDDS-9388
>             Project: Apache Ozone
>          Issue Type: Improvement
>          Components: Ozone Manager
>            Reporter: Duong
>            Assignee: Duong
>            Priority: Major
>              Labels: performance, pull-request-available
>             Fix For: 2.0.0
>
>
> ACL check and bucket soft-link resolution should be moved to preExecute. Today, these checks are done in validateAndUpdateCache and performed in each replica. Those should be done when the leader node receives the operation. Checks should be validated upfront, not in the state application. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org