4141import org .apache .paimon .operation .PartitionExpire ;
4242import org .apache .paimon .operation .SnapshotDeletion ;
4343import org .apache .paimon .operation .TagDeletion ;
44+ import org .apache .paimon .operation .commit .ConflictDetection ;
4445import org .apache .paimon .partition .PartitionExpireStrategy ;
4546import org .apache .paimon .schema .SchemaManager ;
4647import org .apache .paimon .schema .TableSchema ;
@@ -267,6 +268,16 @@ public FileStoreCommitImpl newCommit(String commitUser, FileStoreTable table) {
267268 if (snapshotCommit == null ) {
268269 snapshotCommit = new RenamingSnapshotCommit (snapshotManager , Lock .empty ());
269270 }
271+ ConflictDetection conflictDetection =
272+ new ConflictDetection (
273+ tableName ,
274+ commitUser ,
275+ partitionType ,
276+ pathFactory (),
277+ newKeyComparator (),
278+ bucketMode (),
279+ options .deletionVectorsEnabled (),
280+ newIndexFileHandler ());
270281 return new FileStoreCommitImpl (
271282 snapshotCommit ,
272283 fileIO ,
@@ -287,7 +298,6 @@ public FileStoreCommitImpl newCommit(String commitUser, FileStoreTable table) {
287298 options .manifestFullCompactionThresholdSize (),
288299 options .manifestMergeMinCount (),
289300 partitionType .getFieldCount () > 0 && options .dynamicPartitionOverwrite (),
290- newKeyComparator (),
291301 options .branch (),
292302 newStatsFileHandler (),
293303 bucketMode (),
@@ -299,8 +309,7 @@ public FileStoreCommitImpl newCommit(String commitUser, FileStoreTable table) {
299309 options .commitMaxRetryWait (),
300310 options .commitStrictModeLastSafeSnapshot ().orElse (null ),
301311 options .rowTrackingEnabled (),
302- options .deletionVectorsEnabled (),
303- newIndexFileHandler ());
312+ conflictDetection );
304313 }
305314
306315 @ Override
0 commit comments