You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@yunikorn.apache.org by "Weiwei Yang (Jira)" <ji...@apache.org> on 2021/09/28 00:12:00 UTC

[jira] [Resolved] (YUNIKORN-862) ClusterContext#removePartition ought to use write lock instead of read lock

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

Weiwei Yang resolved YUNIKORN-862.
----------------------------------
    Fix Version/s: 1.0.0
         Assignee: Chia-Ping Tsai
       Resolution: Fixed

> ClusterContext#removePartition ought to use write lock instead of read lock
> ---------------------------------------------------------------------------
>
>                 Key: YUNIKORN-862
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-862
>             Project: Apache YuniKorn
>          Issue Type: Bug
>            Reporter: Chia-Ping Tsai
>            Assignee: Chia-Ping Tsai
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.0.0
>
>
> {code:go}
> func (cc *ClusterContext) removePartition(partitionName string) {
> 	cc.RLock()
> 	defer cc.RUnlock()
> 	delete(cc.partitions, partitionName)
> }
> {code}
> the delete operation is a kind of write operation, so it should use write lock.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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