lokeshj1703 commented on code in PR #13077:
URL: https://github.com/apache/hudi/pull/13077#discussion_r2026593026
##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/TimeGeneratorBase.java:
##########
@@ -85,20 +85,26 @@ public TimeGeneratorBase(HoodieTimeGeneratorConfig config,
StorageConfiguration<
protected LockProvider<?> getLockProvider() {
// Perform lazy initialization of lock provider only if needed
- if (lockProvider == null) {
+ String lockProviderClass =
lockConfiguration.getConfig().getString("hoodie.write.lock.provider");
+ LOG.info("LockProvider for TimeGenerator: {}", lockProviderClass);
+ if (!LockProvider.isThreadSafe(lockProviderClass)) {
+ return createLockProvider(lockProviderClass);
Review Comment:
Yeah. That should also work. Only issue could be contention when multiple
streams are multiplexed on same driver. But it should be better than having a
separate lock provider I think.
--
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]