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

Index Structure Transaction Supports #2562

Open
1 of 2 tasks
mapleFU opened this issue Sep 30, 2024 · 3 comments
Open
1 of 2 tasks

Index Structure Transaction Supports #2562

mapleFU opened this issue Sep 30, 2024 · 3 comments
Assignees
Labels
enhancement type enhancement

Comments

@mapleFU
Copy link
Member

mapleFU commented Sep 30, 2024

Search before asking

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

Motivation

In databases, transactions is both for external and internal usages. External usages like explicit transactions "BEGIN" "END" with multiple operations. Internal usage is also a large part of transactions, basically, the usage would like:

  1. Index creation. The index build might base on a "data snapshot", and after index is first build, the system might catch up incoming logs to build the index
  2. Index maintainance. When insertion to data, the correspond index should being updated. This is also a "internal transaction"
  3. And internal structure change, syncing might all related to index etc...

Solution

in Kvrocks, we also need Transaction for secondary index:

  • IndexUpdater, GlobalIndexer, IndexManager might need gurantee transaction syntax
  • Follow or force transaction in Index related module

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@mapleFU mapleFU added the enhancement type enhancement label Sep 30, 2024
@mapleFU
Copy link
Member Author

mapleFU commented Sep 30, 2024

cc @PragmaTwice @PokIsemaine

@PokIsemaine
Copy link
Contributor

I think the engine::Context for each command needs to be promoted to Connection::ExecuteCommand, and ExecuteCommand also accepts an engine::Context parameter. This allows multiple commands (or internal procedures) to use the same engine::Context while facilitating unified management

@PragmaTwice
Copy link
Member

PragmaTwice commented Oct 7, 2024

Refer to #2563.

Also same for scripting transaction optimization.

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

3 participants