Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 5, 2025

Conversation

dgeee13
Copy link
Contributor

@dgeee13 dgeee13 commented May 15, 2025

Type of Change

  • 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 - #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.

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?

Testing using test fn test_concurrent_webhook_insertion_with_redis_lock
Screenshot 2025-07-08 at 9 03 28 PM

Checklist

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

@dgeee13 dgeee13 requested a review from a team as a code owner May 15, 2025 08:05
Copy link

semanticdiff-com bot commented May 15, 2025

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

@dgeee13 dgeee13 force-pushed the eventLockingFix branch from 90a684f to 0568374 Compare May 15, 2025 08:07
@dgeee13 dgeee13 self-assigned this May 15, 2025
@dgeee13 dgeee13 added A-core Area: Core flows S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels May 15, 2025
@dgeee13 dgeee13 force-pushed the eventLockingFix branch from 0568374 to 6b1daf1 Compare May 15, 2025 08:53
@dgeee13 dgeee13 requested a review from a team as a code owner May 15, 2025 08:53
SanchithHegde
SanchithHegde previously approved these changes May 15, 2025
@dgeee13 dgeee13 force-pushed the eventLockingFix branch 5 times, most recently from 92536d7 to 9372b72 Compare July 10, 2025 11:02
@dgeee13 dgeee13 requested a review from SanchithHegde July 10, 2025 11:07
@dgeee13 dgeee13 added the ai-review AI: request for coderabbit review label Jul 15, 2025
@dgeee13 dgeee13 removed the ai-review AI: request for coderabbit review label Jul 16, 2025
@dgeee13 dgeee13 force-pushed the eventLockingFix branch 2 times, most recently from 61d3c91 to de9a610 Compare July 21, 2025 17:57
SanchithHegde
SanchithHegde previously approved these changes Jul 30, 2025
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Aug 4, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 4, 2025
@likhinbopanna likhinbopanna added this pull request to the merge queue Aug 4, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 4, 2025
@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue Aug 5, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 5, 2025
SanchithHegde
SanchithHegde previously approved these changes Aug 5, 2025
SanchithHegde
SanchithHegde previously approved these changes Aug 5, 2025
@likhinbopanna likhinbopanna added this pull request to the merge queue Aug 5, 2025
Merged via the queue into main with commit 312c733 Aug 5, 2025
17 of 22 checks passed
@likhinbopanna likhinbopanna deleted the eventLockingFix branch August 5, 2025 14:04
@SanchithHegde SanchithHegde added C-bug Category: Bug and removed S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Aug 5, 2025
pixincreate added a commit that referenced this pull request Aug 6, 2025
…ordea-sepa

* 'main' of github.com:juspay/hyperswitch: (89 commits)
  feat(router): [worldpayvantiv] add dispute list sync and implement dispute (#8830)
  feat(core): Add support for Void after Capture (#8839)
  fix(wasm): [FISERV] Added GooglePay Payment Method Type (#8832)
  feat(connector): [Barclaycard] Add Google Pay Payment Method (#8786)
  chore(version): 2025.08.06.0
  feat(core): Added additional authentication fields for 3ds external authentication (#8758)
  refactor(core): propagate network_transaction_id in response of payment (#8829)
  fix(core): add fix for stopping multiple event locking idempotent logs (#8034)
  feat(connector): [AUTHORIZEDOTNET] create connector customer flow added (#8774)
  feat(core): Add L2_L3 Data Support  (#8828)
  feat(connector): [NMI] Add mandates flow (#8652)
  fix(connector): [Wise] send uuid as connector_transaction_id (#8836)
  feat(core): populate UCS status_code in response headers (#8788)
  feat(external_services): Fixed Url for Unified Connector Service gRPC Client (#8587)
  chore: reorder v2 migrations folders (#8671)
  fix(router): Take merchant ID from headers in API Key - Revoke (v2) (#8808)
  fix(connector): (payload) currency auth key wasm changes (#8825)
  feat(payment-methods): add filtering logic for payment method list v2 (#8606)
  feat(router): add support for apple pay pre-decrypted token in the payments confirm call (#8815)
  chore(version): 2025.08.05.0
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows C-bug Category: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants