danny0405 commented on code in PR #9850: URL: https://github.com/apache/hudi/pull/9850#discussion_r1359177852
########## hudi-flink-datasource/hudi-flink/src/test/java/org/apache/hudi/sink/utils/TestWriteBase.java: ########## @@ -524,9 +524,15 @@ private void checkInstantState(HoodieInstant.State state, String instantStr) { } protected String lastCompleteInstant() { - return OptionsResolver.isMorTable(conf) - ? TestUtils.getLastDeltaCompleteInstant(basePath) - : TestUtils.getLastCompleteInstant(basePath, HoodieTimeline.COMMIT_ACTION); + if (OptionsResolver.isLocklessMultiWriter(this.conf)) { + // If there are lockless multiple writer, fetch last complete instant of current writer from ckp metadata + // because the writer started first might finish later, similarly, the writer started later might finish first. + return this.ckpMetadata.lastCompleteInstant(); + } else { Review Comment: Does `this.ckpMetadata.isEmpty()` indicate a failover? -- 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-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org