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

fix: avoid 2 extra db requests #1054

Draft
wants to merge 72 commits into
base: main
Choose a base branch
from
Draft

fix: avoid 2 extra db requests #1054

wants to merge 72 commits into from

Conversation

kalinkrustev
Copy link
Contributor

No description provided.

vijayg10 and others added 30 commits November 8, 2023 18:34
* feat(3574): updated prepare handler for FX

* feat(3574): added fxTransfer related tables;  updated validator for FX

* feat(3574): added fxTransfer related tables;  updated validator for FX

* feat(3574): comments/todos

* feat(3574): added fx roleTypes; added content.context

* feat(3574): added cyril; updated unit-tests
* chore: updated central service shared lib

* feat: added some changes for fx flow

* feat: added changes for position prepare handler

* chore: refactor cyril functions

* feat: position-commit working

* feat: upgraded central shared

* chore(snapshot): 17.4.0-snapshot.0

* chore(snapshot): 17.4.0-snapshot.1

* chore(snapshot): 17.4.0-snapshot.2
* feat: add FX quotes endpointType and kafka topics
* chore: upgrade cs-shared
* chore: fix audit
* fix: cluster performance testing issues (#996)

* test: fix disconnect errors (#998)

* chore(release): 17.6.1 [skip ci]

* chore: fix current tests

* boolean

* chore: add endpoints to test data

* fix endpoint import

* chore: improve validator coverage

* chore: move prepare tests into file to match src structure

---------

Co-authored-by: Kalin Krustev <[email protected]>
Co-authored-by: mojaloopci <[email protected]>
* chore: more coverage

* coverage
kalinkrustev and others added 22 commits May 28, 2024 16:42
…ndling (#1035)

* chore: add integration test for batch

* unit

* reenable

* chore: comments

* feat: added timeout handler implementation

* test

* cleanup function

* test

* remove

* reorder

* fix potential int test failures

* fix tests

* fix: queries

* unit tests

* unskip

* fix potential int test failures

* reorder

* fix replace

* unit tests

* fix: int tests

* fix: issues

* fix: fx timeout

* chore: update central services shared

* fix: cicd

* fix: deps

* fix: lint

* fix: unit tests

* chore: added unit tests

* chore: added unit tests

* pull,audit,dep

* update tests

* update position query logic

* rename

* add comment

* detail

---------

Co-authored-by: Vijay <[email protected]>
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
22.2% Duplication on New Code

See analysis details on SonarCloud

Comment on lines 310 to 312
const cyrilOutput = await this.cyril.processFxFulfilMessage(transfer.commitRequestId, payload)
if (!transfer.fxWatchListId) {
throw new Error(`Commit request ID ${transfer.commitRequestId} not found in watch list`)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we still have a function in cyril 'processFxFulfilMessage' for this check? I mean. you can remove the call 'getAllDetailsByCommitRequestId' in that function, but I would recommend the queries (getItemInWatchListByCommitRequestId) on watchlist in the cyril functions instead of having a join in other place. Because the watchlist logic may change and I wouldn't suggest merging watchList in the places other than cyril. I know it's additional query but I hope it will not impact performance that much compared to left join.

@@ -90,9 +90,11 @@ const getAllDetailsByCommitRequestId = async (commitRequestId) => {
.leftJoin('fxTransferStateChange AS tsc', 'tsc.commitRequestId', 'fxTransfer.commitRequestId')
.leftJoin('transferState AS ts', 'ts.transferStateId', 'tsc.transferStateId')
.leftJoin('fxTransferFulfilment AS tf', 'tf.commitRequestId', 'fxTransfer.commitRequestId')
.leftJoin('fxWatchList AS wl', 'wl.commitRequestId', 'fxTransfer.commitRequestId')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see my above comment.

@kalinkrustev kalinkrustev marked this pull request as draft June 18, 2024 09:02
Base automatically changed from feat/fx-impl to main December 20, 2024 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants