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

Change the RoTxn to support both WithTls and WithoutTls #290

Closed
Kerollmops opened this issue Nov 30, 2024 · 0 comments · Fixed by #315 or #300
Closed

Change the RoTxn to support both WithTls and WithoutTls #290

Kerollmops opened this issue Nov 30, 2024 · 0 comments · Fixed by #315 or #300
Labels
breaking A change that is breaking the semver enhancement New feature or request
Milestone

Comments

@Kerollmops
Copy link
Member

Currently, all RoTxn created structs are Send if the read-txn-no-tls crate feature is set. This is not ideal because TLS-based RoTxn are less expensive and could be enabled by a dependency also depending on heed.

The best way to disable TLS would be to create two new unit structs: the WithTls and WithoutTls. The RoTxn would be parametric on it and become: RoTxn<WithoutTls> which makes it Send. We define this parameter when constructing it.

Unfortunately, the Env::read_txn method cannot use the default WithoutTls parameter as there are no default generics on methods in Rust, yet...

@Kerollmops Kerollmops added enhancement New feature or request breaking A change that is breaking the semver labels Nov 30, 2024
This was linked to pull requests Mar 6, 2025
@Kerollmops Kerollmops added this to the v0.22.0 🔑 milestone Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking A change that is breaking the semver enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant