-
Notifications
You must be signed in to change notification settings - Fork 4.6k
fix(revenue_recovery): Daily Retry History is being wrongly updated when its an expiry update #10501
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
Open
NISHANTH1221
wants to merge
14
commits into
main
Choose a base branch
from
account_updater_bugs_resolve
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+61
−33
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Changed Files
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #10501 +/- ##
=======================================
Coverage ? 6.46%
=======================================
Files ? 1251
Lines ? 312612
Branches ? 0
=======================================
Hits ? 20205
Misses ? 292407
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
9cb812b to
e51787b
Compare
srujanchikke
reviewed
Dec 8, 2025
Comment on lines
618
to
620
| if is_account_updater { | ||
| existing_token.is_active = token_data.is_active; | ||
| } |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
| if is_account_updater { | |
| existing_token.is_active = token_data.is_active; | |
| } | |
| (is_account_updater).then(|| { | |
| existing_token.is_active = token_data.is_active; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
When account updater is done on a particular card token it may result in new token with new details(
New Token) or old token with new details(Expiry Update). The bug is that when we were updating the token in case of Expiry update we were copying the daily retry history of the token and sending it toupsert_payment_processor_tokenfunction that function get the daily retry history with the new token and get the token from redis and update the redis with the same retry histry which results in count to be doubledBefore doing account updater details
Redis -> Token1 ( daily_retry_history : {"02-12-25": 1} )
after getting
updated old token -> upsert_payment_processor_token ( In this we fetch the existing Token1 daily retry history which is this : ( daily_retry_history : {"02-12-25": 1} ) and we will get updated Token1 which will be same : ( daily_retry_history : {"02-12-25": 1} ) The upset function iterates through the daily_retry_history of the updated Old token and make the net daily retry history as ( daily_retry_history : {"02-12-25": 2} ) .
And second bug is that we shouldn't update the
is_hard_declinefield just after the expiry update and give it chance to do one more retry. If the hard decline flag is updated to true just after the expiry update then the token wont be picked up again. So there is no point of account updater and we didn't do any retry with the updated expiry details.Additional Changes
Motivation and Context
How did you test it?
Can follow the steps mentioned in #10112 to test this.
Checklist
cargo +nightly fmt --allcargo clippy