Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: reinstate the appropriate transaction for prebuild reconciliation#20587

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
SasSwart wants to merge1 commit intomain
base:main
Choose a base branch
Loading
fromjjs/restore-prebuilds-transaction

Conversation

@SasSwart
Copy link
Contributor

@SasSwartSasSwart commentedOct 30, 2025
edited
Loading

This pull request fixes a bug that was introduced in#18010, which resulted in the main reconciliation transaction being unused. Instead, all database related methods were accessing c.store directly.

The next step will be to replace usages of c.store within the reconciliation loop with an injected transaction parameter to represent the transaction to use.

@SasSwartSasSwart marked this pull request as ready for reviewOctober 30, 2025 15:54
Copy link
Contributor

@ssncferreirassncferreira left a comment

Choose a reason for hiding this comment

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

LGTM 🔑

Copy link
Member

@johnstcnjohnstcn left a comment

Choose a reason for hiding this comment

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

I'm OK with this as a quick fix, but I might suggest going further and replacingc.store entirely withInTx. Could be a separate refactor though.

@SasSwart
Copy link
ContributorAuthor

I just saw a comment:

// This is a read-only tx, so returning an error (i.e. causing a rollback) has no impact.

I need to investigate this before we merge this PR.

Copy link
Contributor

@ssncferreirassncferreira left a comment

Choose a reason for hiding this comment

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

As discussed internally inSlack: After thinking this through, I realized the current transaction design is actually correct. We shouldn't change the outer transaction to read-write or passtx to the membership reconciler.

The outer transaction should remain read-only: its purpose is locking and consistent snapshotting. Write operations (membership inserts, goroutine creates/deletes) should continue usingc.store to create separate transactions, allowing successful writes to commit independently even if reconciliation fails later.

What we should change in this PR:

  • Update read operations within a transaction to usetx
  • Keep write operations usingc.store

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ssncferreirassncferreirassncferreira requested changes

@johnstcnjohnstcnjohnstcn approved these changes

Requested changes must be addressed to merge this pull request.

Assignees

@SasSwartSasSwart

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@SasSwart@johnstcn@ssncferreira

[8]ページ先頭

©2009-2025 Movatter.jp