cshuo commented on code in PR #18348: URL: https://github.com/apache/hudi/pull/18348#discussion_r3051072861
########## hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java: ########## @@ -181,7 +165,8 @@ public abstract class HoodieBackedTableMetadataWriter<I, O> implements HoodieTab private boolean hasPartitionsStateChanged = false; protected final transient HoodieEngineContext engineContext; @Getter - protected final List<MetadataPartitionType> enabledPartitionTypes; + protected final transient Map<MetadataPartitionType, Indexer> enabledIndexerMap; Review Comment: Marking these fields as transient is intentional. HoodieBackedTableMetadataWriter can be captured in Spark execution closures, so any field reachable from it must either be serializable or excluded from serialization. `enabledIndexerMap` / `expressionIndexRecordGenerator` and the existing field `engineContext ` are runtime-only collaborators and are not serializable as part of the Spark closure. So the goal here is to avoid closure-serialization failures, not to make the writer meaningfully deserializable for later reuse. -- 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]
