codope commented on a change in pull request #4110:
URL: https://github.com/apache/hudi/pull/4110#discussion_r757074542
##########
File path:
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/rollback/RollbackUtils.java
##########
@@ -228,8 +228,9 @@ static HoodieRollbackStat
mergeRollbackStat(HoodieRollbackStat stat1, HoodieRoll
// used to write the new log files. In this case, the commit time for the
log file is the compaction requested time.
// But the index (global) might store the baseCommit of the base and not
the requested, hence get the
// baseCommit always by listing the file slice
- Map<String, String> fileIdToBaseCommitTimeForLogMap =
table.getSliceView().getLatestFileSlices(partitionPath)
- .collect(Collectors.toMap(FileSlice::getFileId,
FileSlice::getBaseInstantTime));
+ Map<String, String> fileIdToBaseCommitTimeForLogMap =
table.getSliceView().getLatestFileSlicesBeforeOrOn(partitionPath,
rollbackInstant.getTimestamp(),
Review comment:
Can we also add a line to the comment above? Helpful to understand while
reading the code.
--
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]