stream2000 commented on PR #8609:
URL: https://github.com/apache/hudi/pull/8609#issuecomment-1598054220
We found that multiple writer parallelly updates will cause both
hoodie.properties and its backup file to be deleted. We should not only deal
with read-write conflicts but also write-write conflicts.
We can reproduce the bug in the following code:
```java
final ExecutorService executor = Executors.newFixedThreadPool(3);
List<Future> fututes = new ArrayList<>();
Future updaterFuture1 = executor.submit(() -> {
HoodieTableMetaClient metaClient =
HoodieTableMetaClient.builder().setConf(BASE_CONF).setBasePath(PATH).build();
for (int i = 0; i < 100; i++) {
IncrementalTTLPolicyUtils.mergeTTLPolicies(metaClient);
}
});
fututes.add(updaterFuture1);
Future updaterFuture2 = executor.submit(() -> {
HoodieTableMetaClient metaClient =
HoodieTableMetaClient.builder().setConf(BASE_CONF).setBasePath(PATH).build();
for (int i = 0; i < 100; i++) {
IncrementalTTLPolicyUtils.mergeTTLPolicies(metaClient);
}
});
fututes.add(updaterFuture2);
// There will be exception throw out in the write future
for (Future f : fututes) {
f.get();
}
```
--
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]