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

Transactions: Use leaked pointers for large transactions #1713

Open
2 tasks
jduo opened this issue Jun 29, 2024 · 1 comment
Open
2 tasks

Transactions: Use leaked pointers for large transactions #1713

jduo opened this issue Jun 29, 2024 · 1 comment
Labels
node Node.js wrapper Optimization Optimization matter such as cleaner code, performance etc
Milestone

Comments

@jduo
Copy link
Collaborator

jduo commented Jun 29, 2024

Describe the feature

#1655 and #1708 add support for sending large command arguments as leaked vectors of bytes to Rust. This speeds up the requests significantly. This is based on a threshold retrieved from Rust.

However a transaction can be made up of multiple requests that individually have arguments that are smaller than this threshold but exceed it when combined.

This feature request would be to use leaked pointers when the combined length of all command arguments in a transaction exceed the threshold rather than only when an individual command.

Use Case

Better performance for large transactions where each request does not exceed the argument size limit individually, but combined do exceed.

Proposed Solution

Change Transactions to contain a List<CommandBuilder, String[] arguments> where the command builder is partially filled with the request type. The arguments are iterated over to get the total argument size and if it exceeds the Rust threshold, all arguments get serialized to byte vectors.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

Client version used

N/A

Environment details (OS name and version, etc.)

macOS

@barshaul
Copy link
Collaborator

barshaul commented Jul 2, 2024

Status:

  • Python
  • Java
  • NodeJS

@asafpamzn asafpamzn moved this to Todo misc in Valkey-GLIDE - internal Jul 9, 2024
@avifenesh avifenesh added node Node.js wrapper Optimization Optimization matter such as cleaner code, performance etc labels Nov 9, 2024
@avifenesh avifenesh moved this to Backlog in Valkey-GLIDE - internal Nov 9, 2024
@asafpamzn asafpamzn added this to the 1.4 milestone Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
node Node.js wrapper Optimization Optimization matter such as cleaner code, performance etc
Projects
Status: Backlog
Development

No branches or pull requests

4 participants