Skip to content

Commit

Permalink
chore: review comments addressed
Browse files Browse the repository at this point in the history
  • Loading branch information
cisse21 committed Jul 25, 2024
1 parent 35a0edf commit 4206ed4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion processor/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4206ed4

Please sign in to comment.