runzhiwang edited a comment on pull request #1028: URL: https://github.com/apache/hadoop-ozone/pull/1028#issuecomment-651703240
> Without write lock the container might be removed from ownerMap and not from the typeMap, which can cause inconsistency. @elek I think this case can not be avoided by only add read lock. Unless we read containerMap, ownerMap, typeMap in the single method with a read lock, Otherwise for example 1. we read containerMap, 2. we remove container, 3. we read ownerMap. It will also cause inconsistency, because container exists in step1 but not exists in step3. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org