pushpavanthar commented on code in PR #7828:
URL: https://github.com/apache/hudi/pull/7828#discussion_r1095685165
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/BaseHoodieTableServiceClient.java:
##########
@@ -734,7 +734,7 @@ protected List<String>
getInstantsToRollback(HoodieTableMetaClient metaClient, H
@Deprecated
public boolean rollback(final String commitInstantTime,
Option<HoodiePendingRollbackInfo> pendingRollbackInfo, boolean skipLocking)
throws HoodieRollbackException {
LOG.info("Begin rollback of instant " + commitInstantTime);
- final String rollbackInstantTime = pendingRollbackInfo.map(entry ->
entry.getRollbackInstant().getTimestamp()).orElse(HoodieActiveTimeline.createNewInstantTime());
+ final String rollbackInstantTime = pendingRollbackInfo.map(entry ->
entry.getRollbackInstant().getTimestamp()).orElse(commitInstantTime);
final Timer.Context timerContext = this.metrics.getRollbackCtx();
Review Comment:
Hi @danny0405, i just realised that this way of picking timestamp from
instant itself will make features like `rollbackToInstant` fail. This approach
fails to place rollback instant in chronological order in timeline.
I'll update the PR with below approach,
use approach similar to below method, which actually takes care of rollbacks
first before creating instant for the commit.
`org.apache.hudi.client.BaseHoodieWriteClient#startCommit(java.lang.String,
org.apache.hudi.common.table.HoodieTableMetaClient)`
--
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]