discivigour commented on code in PR #7826:
URL: https://github.com/apache/paimon/pull/7826#discussion_r3226824300
##########
paimon-core/src/main/java/org/apache/paimon/operation/FileStoreCommitImpl.java:
##########
@@ -1164,6 +1153,87 @@ private boolean compactManifestOnce() {
return commitSnapshotImpl(newSnapshot, emptyList());
}
+ private List<ManifestFileMeta> mergeManifests(
+ List<ManifestFileMeta> input,
+ int suggestedMinMetaCount,
+ long manifestFullCompactionSize) {
+ List<ManifestFileMeta> newFilesForAbort = new ArrayList<>();
+ try {
+ return mergeManifests(
+ input, suggestedMinMetaCount, manifestFullCompactionSize,
newFilesForAbort);
+ } catch (Throwable e) {
+ for (ManifestFileMeta manifest : newFilesForAbort) {
+ manifestFile.delete(manifest.fileName());
+ }
+ if (e instanceof Error) {
+ throw (Error) e;
+ }
+ throw new RuntimeException(e);
+ }
+ }
+
+ private List<ManifestFileMeta> mergeManifests(
+ List<ManifestFileMeta> input,
+ int suggestedMinMetaCount,
+ long manifestFullCompactionSize,
+ List<ManifestFileMeta> newFilesForAbort)
+ throws Exception {
+ List<ManifestFileMeta> merged =
+ ManifestFileMerger.merge(
+ input,
+ manifestFile,
+ options.manifestTargetSize().getBytes(),
+ suggestedMinMetaCount,
+ manifestFullCompactionSize,
+ partitionType,
+ options.scanManifestParallelism());
+ addCreatedManifestFiles(input, merged, newFilesForAbort);
+ if (options.manifestSortEnabled()) {
+ Optional<List<ManifestFileMeta>> sorted =
+ ManifestFileMerger.trySortCompaction(
Review Comment:
Perhaps we shouldn't perform manifest sort when the user commits.
--
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]