danny0405 commented on code in PR #13077:
URL: https://github.com/apache/hudi/pull/13077#discussion_r2026529477
##########
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:
Can we just make the `LockProvider#tryLock` synchronized to make all of them
thread-safe?
--
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]