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

End span in DELETE function #62

Merged
merged 1 commit into from
Dec 21, 2023
Merged

Conversation

Kaspiman
Copy link

@Kaspiman Kaspiman commented Dec 21, 2023

Reason for This PR

Span does not closed properly.

Description of Changes

Defer end in DELETE function.

License Acceptance

By submitting this pull request, I confirm that my contribution is made under
the terms of the MIT license.

PR Checklist

[Author TODO: Meet these criteria.]
[Reviewer TODO: Verify that these criteria are met. Request changes if not]

  • All commits in this PR are signed (git commit -s).
  • The reason for this PR is clearly provided (issue no. or explanation).
  • The description of changes is clear and encompassing.
  • Any required documentation changes (code and docs) are included in this PR.
  • Any user-facing changes are mentioned in CHANGELOG.md.
  • All added/changed functionality is tested.

Summary by CodeRabbit

  • Refactor
    • Improved tracing handling in the delete functionality for better performance monitoring.

Signed-off-by: Vladimir Plakhotnikov <embargo2710@gmail.com>
Copy link

coderabbitai bot commented Dec 21, 2023

Walkthrough

The update to the Driver type's Delete method now includes a defer statement to ensure that the span is ended correctly, which is essential for consistent tracing and logging. This addition is a small but crucial enhancement for resource management and debugging.

Changes

File Summary of Changes
kv/driver.go Added defer statement for span ending in Delete method

🐇🎉
To the code, we hop and delve,
A defer added, with care we've dealt.
Tracing's end, now neatly shelved,
In Delete, our bugs are quelled. 🥕🌟

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on X ?


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • You can reply to a review comment made by CodeRabbit.
  • You can tag CodeRabbit on specific lines of code or files in the PR by tagging @coderabbitai in a comment.
  • You can tag @coderabbitai in a PR comment and ask one-off questions about the PR and the codebase. Use quoted replies to pass the context for follow-up questions.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between a89bcee and 47ac696.
Files selected for processing (1)
  • kv/driver.go (1 hunks)
Additional comments: 1
kv/driver.go (1)
  • 228-228: The addition of defer span.End() ensures that the span is properly closed, which is a good practice for managing the lifecycle of spans in tracing. This change correctly addresses the bug described in the PR objectives.

@rustatian rustatian self-requested a review December 21, 2023 11:16
@rustatian rustatian added the enhancement New feature or request label Dec 21, 2023
@rustatian
Copy link
Member

Hey @Kaspiman 👋
Nice catch 👍

@rustatian rustatian merged commit 1e1045b into roadrunner-server:master Dec 21, 2023
@rustatian
Copy link
Member

Thanks @Kaspiman 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants