From 4206ed460963c9b82ca0e23376cada11f842c40b Mon Sep 17 00:00:00 2001 From: Rohith BCS Date: Thu, 25 Jul 2024 18:06:12 +0530 Subject: [PATCH] chore: review comments addressed --- processor/processor.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/processor/processor.go b/processor/processor.go index c1f738844c..3bc4998e48 100644 --- a/processor/processor.go +++ b/processor/processor.go @@ -1709,7 +1709,11 @@ func (proc *Handle) processJobsForDest(partition string, subJobs subJob) *transf p := payloadFunc() messageSize := int64(len(p)) dedupKey := fmt.Sprintf("%v%v", messageId, eventParams.SourceJobRunId) - if ok, previousSize, err := proc.dedup.Set(dedupTypes.KeyValue{Key: dedupKey, Value: messageSize}); !ok && err != nil { + ok, previousSize, err := proc.dedup.Set(dedupTypes.KeyValue{Key: dedupKey, Value: messageSize}) + if err != nil { + panic(err) + } + if !ok { proc.logger.Debugf("Dropping event with duplicate dedupKey: %s", dedupKey) sourceDupStats[dupStatKey{sourceID: source.ID, equalSize: messageSize == previousSize}] += 1 continue