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

Optimize transactions for Multi/Exec commands #2554

Open
1 of 2 tasks
jonathanc-n opened this issue Sep 23, 2024 · 2 comments
Open
1 of 2 tasks

Optimize transactions for Multi/Exec commands #2554

jonathanc-n opened this issue Sep 23, 2024 · 2 comments
Labels
enhancement type enhancement

Comments

@jonathanc-n
Copy link
Contributor

Search before asking

  • I had searched in the issues and found no similar issues.

Motivation

Issue referencing #2331
Want to optimize concurrency when executing transactions with multiple commands.

Solution

Possibly implement OCC or some other concurrency while not introducing too much complexity to the codebase.

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@jonathanc-n jonathanc-n added the enhancement type enhancement label Sep 23, 2024
@jonathanc-n
Copy link
Contributor Author

@PokIsemaine You can mark this in your issue you posted

@PokIsemaine
Copy link
Contributor

Thanks for the reminder, I'm sorry for the slow progress due to my busy work lately.

My initial idea was to provide a snapshot-like mechanism based on the recently added engine::Context and apply it to Multi/Exec.
A single engine::Context will manage multiple commands and replace exclusive locks compared to normal commands.

image

Now to consider:

  1. engine::Context is still experimental and unstable, do we want to support the new Multi/Exec pattern based on it now?
  2. An implementation based on engine::Context may improve concurrency, but at the cost of not achieving a serializable level of isolation, which I'm not sure fits into Multi/Exec's semantics

The above is my current thoughts, if you have other better suggestions, please also welcome to discuss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement type enhancement
Projects
None yet
Development

No branches or pull requests

2 participants