-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SUPPORT] Hive Metastore Lock Provider throws IllegalArgumentException ALREADY_ACQUIRED #5702
Comments
@ganczarek Can you please try latest Hudi (0.11.1)? There were a couple of fixes in the lock provider. See #5255 |
I also encountered this problem when using multiple dataSource writers. |
That's correct!
This is not always the case. After But the real problem is that we don't reset the lock in this case. We should fix this. HUDI-4518 to track this. |
Closing as the fix landed. This should be released in v0.12.0 |
If the lock is not null but its state has not yet transitioned to ACQUIRED, retry fails because the lock is not de-allocated. See issue apache#5702
Describe the problem you faced
Hive-based lock provider throws
IllegalArgumentException
on the second try to acquire a lock.I think it's because
tryLock
returns false whenthis.lock
object was created, but not inLockState.ACQUIRED
state:hudi/hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/HiveMetastoreBasedLockProvider.java
Line 116 in f52cb32
this.lock
is never reset between retries, so when Lock manager callstryLock
for the second time the validation fails:hudi/hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/HiveMetastoreBasedLockProvider.java
Line 136 in f52cb32
To Reproduce
A second writer was writing to the table at that time, so it must have acquired a lock.
Expected behavior
Hudi should retry to acquire a lock.
Environment Description
Additional context
Lock config:
Stacktrace
The text was updated successfully, but these errors were encountered: