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

Use a single DB transaction within getTransactions #334

Closed
aditya1702 opened this issue Dec 3, 2024 · 0 comments · Fixed by #338
Closed

Use a single DB transaction within getTransactions #334

aditya1702 opened this issue Dec 3, 2024 · 0 comments · Fixed by #338
Assignees
Labels
bug Something isn't working rpc-sdk-scrum

Comments

@aditya1702
Copy link
Contributor

aditya1702 commented Dec 3, 2024

Currently, both these methods involve a call to GetLedgerRange to get the current RPC range and then subsequent calls to the DB to get different ledger close meta. This introduces a race condition where ingestion can happen between these 2 calls and change the ledger range snapshot in the db.

To mitigate this, we want to use a single DB transaction throughout the entire lifecycle of the request.

@aditya1702 aditya1702 added the bug Something isn't working label Dec 3, 2024
@aditya1702 aditya1702 added this to the platform sprint 53 milestone Dec 3, 2024
@aditya1702 aditya1702 self-assigned this Dec 3, 2024
@Shaptic Shaptic moved this from Backlog to In Progress in Platform Scrum Dec 3, 2024
@aditya1702 aditya1702 moved this from In Progress to Needs Review in Platform Scrum Dec 13, 2024
@aditya1702 aditya1702 changed the title Use a single DB transaction within getTransactions and getEvents Use a single DB transaction within getTransactions Dec 16, 2024
@github-project-automation github-project-automation bot moved this from Needs Review to Done in Platform Scrum Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rpc-sdk-scrum
Projects
Status: Done
2 participants