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

Return context when new transaction fails #1033

Merged
merged 1 commit into from
May 11, 2023
Merged

Conversation

lovromazgon
Copy link
Member

Description

If we fail to create a new DB transaction we should still return a valid context, otherwise the caller might end up with a nil context. I noticed it here where we use the context to log and the empty context caused a panic in one of the logger hooks.

Quick checks:

  • I have followed the Code Guidelines.
  • There is no other pull request for the same update/change.
  • I have written unit tests.
  • I have made sure that the PR is of reasonable size and can be easily reviewed.

@lovromazgon lovromazgon requested a review from a team as a code owner May 11, 2023 14:40
@lovromazgon lovromazgon merged commit b26d260 into main May 11, 2023
3 checks passed
@lovromazgon lovromazgon deleted the lovro/db-txn-context branch May 11, 2023 14:47
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.

None yet

2 participants