danny0405 commented on code in PR #10886:
URL: https://github.com/apache/hudi/pull/10886#discussion_r1568071623
##########
hudi-common/src/main/java/org/apache/hudi/common/model/HoodiePartitionMetadata.java:
##########
@@ -92,11 +92,12 @@ public int getPartitionDepth() {
/**
* Write the metadata safely into partition atomically.
+ * To avoid concurrent write into the same partition (for example in
speculative case),
+ * please make sure writeToken is unique.
*/
- public void trySave(int taskPartitionId) {
+ public void trySave(String writeToken) throws IOException {
Review Comment:
Let's switch to UUID to simplify the code, there is no possibility for
conflicts any more, so the gains for debugging is little, we just need to
handle the tmp file deletion in good manner, which should be ensured by
`HoodieWrapperFileSystem#createImmutableFileInPath`.
--
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]