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 WithContext to respect the contexts passed down to the SQL store #1057

Merged
merged 7 commits into from
Mar 15, 2024

Conversation

peterjan
Copy link
Member

No description provided.

@peterjan peterjan self-assigned this Mar 12, 2024
@peterjan peterjan marked this pull request as ready for review March 12, 2024 16:25
@peterjan peterjan requested a review from ChrisSchinnerl March 12, 2024 16:25
Copy link
Member

@ChrisSchinnerl ChrisSchinnerl left a comment

Choose a reason for hiding this comment

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

Ngl after our last context refactor this is making me quite nervous. Did you run it for a bit to see nothing unexpected happens? Like db txns getting aborted because we messed up some contexts?

@peterjan
Copy link
Member Author

Ngl after our last context refactor this is making me quite nervous. Did you run it for a bit to see nothing unexpected happens? Like db txns getting aborted because we messed up some contexts?

No, that's kind of what dev is for though right? I'm not running anything at the moment because I (temporarily) lost my personal node and I'm debugging integrity for pruning errors. I don't mind running this but even though I see how this can make us quite nervous I think it's probably fine?

I think it's a pretty good change actually because there are likely cases where browsers cancel a request while our database engine is still processing the request and there's nothing cancelling that out. This should do that I believe. I don't mind running it on areq for a while before merging it maybe?

This PR also includes the unused linters which I def. think we should add. I based it off of this one because all our ctx were unused and figured it could go separate...

@ChrisSchinnerl
Copy link
Member

Ngl after our last context refactor this is making me quite nervous. Did you run it for a bit to see nothing unexpected happens? Like db txns getting aborted because we messed up some contexts?

No, that's kind of what dev is for though right? I'm not running anything at the moment because I (temporarily) lost my personal node and I'm debugging integrity for pruning errors. I don't mind running this but even though I see how this can make us quite nervous I think it's probably fine?

I think it's a pretty good change actually because there are likely cases where browsers cancel a request while our database engine is still processing the request and there's nothing cancelling that out. This should do that I believe. I don't mind running it on areq for a while before merging it maybe?

This PR also includes the unused linters which I def. think we should add. I based it off of this one because all our ctx were unused and figured it could go separate...

I'm not saying it's a bad change but this is prone to similar issues as shutdownCtx. Where now that we cancel database operations, if we pass the wrong context in the wrong spot, we actually interrupt operations that we don't want to have interrupted. Or we might end up with a ton of logging that we don't want.
Running this for a couple of hours in Arequipa should rule out any obvious issues at least before merging.

@peterjan
Copy link
Member Author

I'm not saying it's a bad change but this is prone to similar issues as shutdownCtx. Where now that we cancel database operations, if we pass the wrong context in the wrong spot, we actually interrupt operations that we don't want to have interrupted. Or we might end up with a ton of logging that we don't want. Running this for a couple of hours in Arequipa should rule out any obvious issues at least before merging.

Yeah I don't mind at all, it ran overnight on areq without issues.

@ChrisSchinnerl ChrisSchinnerl merged commit 7efeb63 into dev Mar 15, 2024
8 checks passed
@ChrisSchinnerl ChrisSchinnerl deleted the pj/db-context branch March 15, 2024 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants