You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/12/21 14:27:43 UTC

[GitHub] [ozone] adoroszlai commented on a change in pull request #2938: HDDS-6129. OM has thread unsafe issues that can cause OM shutdown.

adoroszlai commented on a change in pull request #2938:
URL: https://github.com/apache/ozone/pull/2938#discussion_r773171078



##########
File path: hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/RepeatedOmKeyInfo.java
##########
@@ -66,7 +68,7 @@ public static RepeatedOmKeyInfo getFromProto(RepeatedKeyInfo
    * @return
    */
   public RepeatedKeyInfo getProto(boolean compact, int clientVersion) {
-    List<KeyInfo> list = new ArrayList<>();
+    List<KeyInfo> list = new CopyOnWriteArrayList<>();
     for(OmKeyInfo k : omKeyInfoList) {

Review comment:
       Since the concurrent modification is reported during iteration, I think the problem is with `omKeyInfoList`, not `list`.




-- 
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-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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