You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2023/01/04 01:57:25 UTC
[GitHub] [hudi] yanghua commented on a diff in pull request #7440: [HUDI-5377] Write call stack information to lock file
yanghua commented on code in PR #7440:
URL: https://github.com/apache/hudi/pull/7440#discussion_r1061082761
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/transaction/lock/FileSystemBasedLockProvider.java:
##########
@@ -139,7 +152,32 @@ private boolean checkIfExpired() {
private void acquireLock() {
try {
- fs.create(this.lockFile, false).close();
+ if (!fs.exists(this.lockFile)) {
+ FSDataOutputStream fos = fs.create(this.lockFile, false);
+ initLockInfo();
+ fos.writeBytes(lockInfo.toString());
Review Comment:
>> May I know if you guys tested against both hdfs and S3.
I did not test on S3, just used this feature(on HDFS) only several times. @fengjian428 Can you give it a try?
If it occurs race conditions on S3, we should find a way to fix it.
--
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-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org