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

[MySQL] Separate integration from publishing checkpoints #344

Merged

Conversation

AlCutter
Copy link
Collaborator

This PR disconnects the act of integrating new entries into a tree, from the act of publishing a new checkpoint which publicly commits to that new tree state for the MySQL storage implementation.

See #323 for more details on the rationale.

Helps with #309 and #198.

@AlCutter AlCutter added the enhancement New feature or request label Nov 28, 2024
@AlCutter AlCutter force-pushed the mysql_integration_is_not_publish branch 4 times, most recently from 61d0169 to 0bcef71 Compare November 29, 2024 14:26
@AlCutter AlCutter requested a review from roger2hk November 29, 2024 14:28
@AlCutter AlCutter force-pushed the mysql_integration_is_not_publish branch from 0bcef71 to 595f2ee Compare November 29, 2024 16:01
storage/mysql/schema.sql Show resolved Hide resolved
storage/mysql/mysql.go Outdated Show resolved Hide resolved
cmd/conformance/mysql/main.go Outdated Show resolved Hide resolved
@AlCutter AlCutter force-pushed the mysql_integration_is_not_publish branch 4 times, most recently from 262fdbe to e756f77 Compare December 2, 2024 16:30
Copy link
Contributor

@roger2hk roger2hk left a comment

Choose a reason for hiding this comment

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

Shall we align the wrapped error? Some of them are wrapped %w while some of them are not %v.

storage/mysql/mysql.go Outdated Show resolved Hide resolved
storage/mysql/mysql.go Outdated Show resolved Hide resolved
@AlCutter
Copy link
Collaborator Author

AlCutter commented Dec 2, 2024

Shall we align the wrapped error? Some of them are wrapped %w while some of them are not %v.

No, don't use %w without a reason - only do it when you're explicitly making the decision to allow callers of the func to be able to be aware of implementation details (https://go.dev/wiki/ErrorValueFAQ#i-am-already-using-fmterrorf-with-v-or-s-to-provide-context-for-an-error-when-should-i-switch-to-w).

@AlCutter AlCutter force-pushed the mysql_integration_is_not_publish branch from e756f77 to f1e3f98 Compare December 2, 2024 17:12
@AlCutter AlCutter force-pushed the mysql_integration_is_not_publish branch from f1e3f98 to cff89e9 Compare December 2, 2024 17:16
@roger2hk
Copy link
Contributor

roger2hk commented Dec 2, 2024

Shall we align the wrapped error? Some of them are wrapped %w while some of them are not %v.

No, don't use %w without a reason - only do it when you're explicitly making the decision to allow callers of the func to be able to be aware of implementation details (https://go.dev/wiki/ErrorValueFAQ#i-am-already-using-fmterrorf-with-v-or-s-to-provide-context-for-an-error-when-should-i-switch-to-w).

Right, I see some of the error messages are using %w. Shall we convert them back to %v in a follow up PR?

@AlCutter
Copy link
Collaborator Author

AlCutter commented Dec 2, 2024

Shall we align the wrapped error? Some of them are wrapped %w while some of them are not %v.

No, don't use %w without a reason - only do it when you're explicitly making the decision to allow callers of the func to be able to be aware of implementation details (https://go.dev/wiki/ErrorValueFAQ#i-am-already-using-fmterrorf-with-v-or-s-to-provide-context-for-an-error-when-should-i-switch-to-w).

Right, I see some of the error messages are using %w. Shall we convert them back to %v in a follow up PR?

Yeah, there seems to be a mix throughout the file so probably needs some time to think about why they were added.

@AlCutter AlCutter merged commit b513925 into transparency-dev:main Dec 2, 2024
15 checks passed
@AlCutter AlCutter deleted the mysql_integration_is_not_publish branch December 2, 2024 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants