hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

fix(core): add fix for stopping multiple event locking idempotent logs

Open dgeee13 opened this issue 7 months ago • 1 comments

Type of Change

  • [x] Bugfix
  • [ ] New feature
  • [ ] Enhancement
  • [ ] Refactoring
  • [ ] Dependency updates
  • [ ] Documentation
  • [ ] CI/CD

Description

Adds fix for stopping multiple event locking idempotent logs Fix on top of previous PR - https://github.com/juspay/hyperswitch/pull/7579 What got missed in the previous PR?

  • We should be searching by merchant ID and idempotent event ID instead of searching by merchant ID and event ID outgoing.rs

Since Event ID would be randomly generated each time, but idempotent event ID remains the same when inserting the event for the first time. cc: @SanchithHegde

Additional Changes

  • [ ] This PR modifies the API contract
  • [ ] This PR modifies the database schema
  • [ ] This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Checklist

  • [X] I formatted the code cargo +nightly fmt --all
  • [X] I addressed lints thrown by cargo clippy
  • [X] I reviewed the submitted code
  • [ ] I added unit tests for my changes where possible

dgeee13 avatar May 15 '25 08:05 dgeee13

Review changes with  SemanticDiff

Changed Files
File Status
  crates/router/src/db/events.rs  3% smaller
  crates/diesel_models/src/query/events.rs  0% smaller
  crates/router/src/core/webhooks/outgoing.rs  0% smaller
  crates/router/src/db/kafka_store.rs  0% smaller

semanticdiff-com[bot] avatar May 15 '25 08:05 semanticdiff-com[bot]