danny0405 commented on code in PR #18967:
URL: https://github.com/apache/hudi/pull/18967#discussion_r3407771976


##########
hudi-common/src/main/java/org/apache/hudi/common/schema/HoodieSchema.java:
##########
@@ -1153,7 +1155,11 @@ public List<HoodieSchemaField> getFields() {
       throw new IllegalStateException("Cannot get fields from schema type: " + 
type);
     }
     if (fields == null) {
-      fields = 
Collections.unmodifiableList(avroSchema.getFields().stream().map(HoodieSchemaField::new).collect(Collectors.toList()));
+      synchronized (this) {

Review Comment:
   the synchronized block may not be necessary if these fields are not allowed 
to be modified.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to