From e3651f70bfa6059dd88a31a0967f94bace4e2eb5 Mon Sep 17 00:00:00 2001 From: Wenjie Guo Date: Fri, 29 Nov 2024 11:57:16 +0800 Subject: [PATCH] Disable FORCE_CHECKSUM_AND_WRITE in event publisher --- .../commonjava/indy/event/publisher/KafkaEventPublisher.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/event-publisher/common/src/main/java/org/commonjava/indy/event/publisher/KafkaEventPublisher.java b/addons/event-publisher/common/src/main/java/org/commonjava/indy/event/publisher/KafkaEventPublisher.java index 02be6e5332..dbad8f08dc 100644 --- a/addons/event-publisher/common/src/main/java/org/commonjava/indy/event/publisher/KafkaEventPublisher.java +++ b/addons/event-publisher/common/src/main/java/org/commonjava/indy/event/publisher/KafkaEventPublisher.java @@ -50,6 +50,7 @@ import java.util.Date; import java.util.Map; +import static org.commonjava.indy.core.content.ContentMetadataGenerator.FORCE_CHECKSUM_AND_WRITE; import static org.commonjava.maven.galley.util.LocationUtils.ATTR_PATH_ENCODE; import static org.commonjava.maven.galley.util.LocationUtils.PATH_ENCODE_BASE64; @@ -156,6 +157,7 @@ private void transformFileEvent( org.commonjava.maven.galley.event.FileEvent gal fileEvent.setTimestamp( new Date() ); + galleyMetadata.set( FORCE_CHECKSUM_AND_WRITE, Boolean.FALSE ); TransferMetadata artifactData = contentDigester.digest( affectedStore, path, galleyMetadata ); fileEvent.setMd5( artifactData.getDigests().get( ContentDigest.MD5 ) ); fileEvent.setSha1( artifactData.getDigests().get( ContentDigest.SHA_1 ) );