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

refactor: SessionContext doesn't require Arc #15491

Merged
merged 1 commit into from
May 12, 2024

Conversation

drmingdrmer
Copy link
Member

@drmingdrmer drmingdrmer commented May 12, 2024

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

Refactor: SessionContext doesn't require Arc

Embrace idiomatic Rust practices by reducing unnecessary sharing. In
this case, since SessionContext is not shared among threads, there is
no need to wrap it in an Arc. This change streamlines the code and
enhances performance by eliminating unneeded atomic reference counting.

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Other

Related Issues


This change is Reviewable

@drmingdrmer drmingdrmer changed the title Refactor: SessionContext doesn't require Arc refactor: SessionContext doesn't require Arc May 12, 2024
@drmingdrmer drmingdrmer marked this pull request as ready for review May 12, 2024 07:47
@github-actions github-actions bot added the pr-refactor this PR changes the code base without new features or bugfix label May 12, 2024
Embrace idiomatic Rust practices by reducing unnecessary sharing. In
this case, since `SessionContext` is not shared among threads, there is
no need to wrap it in an `Arc`. This change streamlines the code and
enhances performance by eliminating unneeded atomic reference counting.
@drmingdrmer drmingdrmer merged commit e90dd66 into databendlabs:main May 12, 2024
72 checks passed
@drmingdrmer drmingdrmer deleted the 77-sess branch May 12, 2024 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-refactor this PR changes the code base without new features or bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants