Skip to content
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

refactor(drainer): change logic for trimming the stream and refactor for modularity #3128

Merged
merged 16 commits into from
Jan 8, 2024

Conversation

dracarys18
Copy link
Member

Type of Change

  • Refactoring

Description

Refactored drainer for modularity and maintainability and changed the logic for trimming the stream.

Motivation and Context

Currently we are trimming the data from the stream regardless of deserialization error or errors while executing the query. This will cause serious data loss in case if we had any error during the query execution or deserialization. So trim only until the last successful ID that was processed.

Also refactored drainer for modularity and maintainability.

How did you test it?

  • Sanity testing on Payments, Refunds.

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code

@dracarys18 dracarys18 added A-framework Area: Framework S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels Dec 13, 2023
@dracarys18 dracarys18 added this to the December 2023 Release milestone Dec 13, 2023
@dracarys18 dracarys18 self-assigned this Dec 13, 2023
@dracarys18 dracarys18 requested a review from a team as a code owner December 13, 2023 11:35
akshay-97
akshay-97 previously approved these changes Dec 13, 2023
@dracarys18 dracarys18 requested a review from jarnura December 14, 2023 13:40
jarnura
jarnura previously approved these changes Dec 15, 2023
akshay-97
akshay-97 previously approved these changes Dec 15, 2023
@dracarys18 dracarys18 dismissed stale reviews from akshay-97 and jarnura via 13dfb13 January 8, 2024 11:39
@likhinbopanna likhinbopanna added this pull request to the merge queue Jan 8, 2024
Merged via the queue into main with commit de7a607 Jan 8, 2024
@likhinbopanna likhinbopanna deleted the drainer_refactor branch January 8, 2024 12:56
pixincreate added a commit that referenced this pull request Jan 9, 2024
* 'main' of github.com:juspay/hyperswitch:
  feat(pm_list): add required fields for Ideal  (#3183)
  refactor: pass customer object to `make_pm_data` (#3246)
  feat(Connector): [VOLT] Add support for Payments Webhooks (#3155)
  fix(users): Added merchant name is list merchants (#3289)
  fix(outgoingwebhookevents): Throw an error when outgoing webhook events env var not found (#3291)
  fix(wasm): fix failing `wasm-pack build` for `euclid_wasm` (#3284)
  ci: add workflow to create stable SemVer tag for a given CalVer tag (#3285)
  fix(connector): [BOA, Cybersource] capture error_code (#3239)
  fix(connector): [BOA/CYB] Fix Metadata Error (#3283)
  chore(version): 2024.01.08.0
  fix: introduce net_amount field in payment response (#3115)
  ci(postman): Adyen assertion fix for expired card test case  (#3279)
  feat(connector): Add Revoke mandate flow (#3261)
  refactor(drainer): change logic for trimming the stream and refactor for modularity (#3128)
  fix(router): Payment link api contract change (#2975)
  feat(pm_list): add required fields for eps (#3169)
  refactor(api_lock): allow api lock on psync only when force sync is true (#3242)
  fix(router): multiple incremental_authorizations with kv enabled (#3185)
  feat(payments): add payment id in all the payment logs (#3142)
  ci: add reusable workflow to create nightly tags in CalVer format (#3247)
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-framework Area: Framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants