lokeshj1703 opened a new pull request, #13077: URL: https://github.com/apache/hudi/pull/13077
### Change Logs TimeGenerator currently reuses the lock provider while generating the timestamp. We need to account for thread safety of lock provider before reusing the lock provider by different threads. The PR currently fixes the logic to ensure lock provider is reused only if it is thread safe. Only InProcessLockProvider is thread safe as of now. The other lock providers are not thread safe. - InProcessLockProvider uses ReentrantReadWriteLock which inherently is thread safe. - DynamoDBBasedLockProvider uses AmazonDynamoDBLockClient which is thread safe but it stores the lock item as an instance variable which can cause issues with multiple threads. - Similarly ZookeeperBasedLockProvider uses CuratorFramework which is thread safe but it stores InterProcessMutex as instance variable. The InterProcessMutex is then released during unlock. - HiveMetastoreBasedLockProvider uses IMetaStoreClient which inherently is not thread safe. - FileSystemBasedLockProvider is also not thread safe since it stores LockInfo and currentOwnerLockInfo as instance variables. Created https://issues.apache.org/jira/browse/HUDI-9254 for tracking the issue ### Impact NA ### Risk level (write none, low medium or high below) low ### Documentation Update NA ### Contributor's checklist - [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [ ] Change Logs and Impact were stated clearly - [ ] Adequate tests were added if applicable - [ ] CI passed -- 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]
