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

[Raft] Add a transaction janitor #6374

Merged
merged 17 commits into from
Apr 24, 2024
Merged

[Raft] Add a transaction janitor #6374

merged 17 commits into from
Apr 24, 2024

Conversation

luluz66
Copy link
Contributor

@luluz66 luluz66 commented Apr 15, 2024

Related issues:
https://github.com/buildbuddy-io/buildbuddy-internal/issues/3279

  • Add a proto TxnRecord and store it in meta range at different stages of
    RunTxn.
  • Add a transaction janitor process to read the txn record and help get the
    stuck transactions unstuck.

Copy link
Member

@tylerwilliams tylerwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall this looks good -- just a few comments!

enterprise/server/raft/constants/constants.go Show resolved Hide resolved
enterprise/server/raft/rbuilder/rbuilder.go Outdated Show resolved Hide resolved
enterprise/server/raft/txnjanitor/txnjanitor.go Outdated Show resolved Hide resolved
@luluz66 luluz66 changed the base branch from master to store-refactor April 17, 2024 18:26
Base automatically changed from store-refactor to master April 17, 2024 19:45
Copy link
Member

@tylerwilliams tylerwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's kind of messy how DeleteTxnRecord and WriteTxnRecord are in the sender but called from the janitor. Could all of these txn coordinator methods be moved to a txncoordinator file, along with the janitor code?

enterprise/server/raft/txnjanitor/txnjanitor.go Outdated Show resolved Hide resolved
@luluz66
Copy link
Contributor Author

luluz66 commented Apr 24, 2024

it's kind of messy how DeleteTxnRecord and WriteTxnRecord are in the sender but called from the janitor. Could all of these txn coordinator methods be moved to a txncoordinator file, along with the janitor code?
I moved the txn related methods including RunTxn from sender to txn.go.

Sender() *sender.Sender
}

type TxnCoordinator struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: just call this Coordinator

@luluz66 luluz66 merged commit bae1ebc into master Apr 24, 2024
12 of 19 checks passed
@luluz66 luluz66 deleted the txn branch April 24, 2024 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants