nbalajee commented on code in PR #18279:
URL: https://github.com/apache/hudi/pull/18279#discussion_r2934382984
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/rollback/RollbackHelper.java:
##########
@@ -146,14 +151,25 @@ List<Pair<String, HoodieRollbackStat>>
maybeDeleteAndCollectStats(HoodieEngineCo
)
.withStorage(metaClient.getStorage())
.withTableVersion(tableVersion)
- .withFileExtension(HoodieLogFile.DELTA_EXTENSION).build();
+ .withFileExtension(HoodieLogFile.DELTA_EXTENSION);
+
+ String logVersionKey =
logVersionLookupKey(rollbackRequest.getPartitionPath(), fileId,
rollbackRequest.getLatestBaseInstant());
+ Pair<Integer, String> preComputedVersion =
logVersionMap.get(logVersionKey);
+ if (preComputedVersion != null) {
+ writerBuilder.withLogVersion(preComputedVersion.getLeft())
+ .withLogWriteToken(preComputedVersion.getRight());
+ }
Review Comment:
If preComputedVersion is null, it means a valid log file is absent or
listing has failed.
The writerBuilder.build(); call in 163, takes care of setting the logVersion
and LogWriteToken fields, based on the HoodieTableVersion.
Setting the LogWriteToken here will trip this default flow.
--
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]