danny0405 commented on code in PR #7320: URL: https://github.com/apache/hudi/pull/7320#discussion_r1035481425
########## hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/client/HoodieFlinkWriteClient.java: ########## @@ -283,21 +283,14 @@ protected void writeTableMetadata(HoodieTable table, String instantTime, String if (this.metadataWriter == null) { initMetadataWriter(); } - try { - // guard the metadata writer with concurrent lock - this.txnManager.getLockManager().lock(); - - // refresh the timeline - - // Note: the data meta client is not refreshed currently, some code path - // relies on the meta client for resolving the latest data schema, - // the schema expects to be immutable for SQL jobs but may be not for non-SQL - // jobs. - this.metadataWriter.initTableMetadata(); - this.metadataWriter.update(metadata, instantTime, getHoodieTable().isTableServiceAction(actionType)); - } finally { - this.txnManager.getLockManager().unlock(); - } + // refresh the timeline + + // Note: the data meta client is not refreshed currently, some code path Review Comment: We also need to fix the default lock config for `FlinkWriteClients#getHoodieClientConfig`: ```java if (conf.getBoolean(FlinkOptions.METADATA_ENABLED) && !conf.containsKey(HoodieLockConfig.LOCK_PROVIDER_CLASS_NAME.key())) { builder.withLockConfig(HoodieLockConfig.newBuilder() .withLockProvider(FileSystemBasedLockProvider.class) .withLockWaitTimeInMillis(2000L) // 2s .withFileSystemLockExpire(1) // 1 minute .withClientNumRetries(30) .withFileSystemLockPath(StreamerUtil.getAuxiliaryPath(conf)) .build()); } ``` -- 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: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org