[ 
https://issues.apache.org/jira/browse/HDDS-14868?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tsz-wo Sze updated HDDS-14868:
------------------------------
    Attachment: 9953_review2.patch

> Avoid full scan of container list during refreshAndValidate of 
> ContainerSafemodeRule
> ------------------------------------------------------------------------------------
>
>                 Key: HDDS-14868
>                 URL: https://issues.apache.org/jira/browse/HDDS-14868
>             Project: Apache Ozone
>          Issue Type: Bug
>            Reporter: Sadanand Shenoy
>            Assignee: Sadanand Shenoy
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: 9953_review.patch, 9953_review2.patch
>
>
> {{refreshAndValidate()}} runs often (on each transaction apply, leader 
> change, and after restart). The old logic was:
> // OLD
> if (forceRefresh || !validate()) {
> initializeRule();// Full scan of ALL containers - expensive!
> }
> {{initializeRule()}} does a full scan of {{containerManager.getContainers()}} 
> and rebuilds all state. With many containers and frequent 
> {{{}refreshAndValidate(){}}}, this is costly. 
> This could be optimized



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to