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

Propagate errors #241

Merged
merged 3 commits into from
Jul 29, 2024

Conversation

MattHalpinParity
Copy link
Contributor

@MattHalpinParity MattHalpinParity commented Jul 29, 2024

As mentioned in Polkadot-sdk #4939
This change propagates all errors other than NotFound as that is needed to determine if the table file needs to be created or not.
@arkpar @cheme Does this seem reasonable?

@MattHalpinParity MattHalpinParity marked this pull request as ready for review July 29, 2024 15:33
Copy link
Collaborator

@cheme cheme left a comment

Choose a reason for hiding this comment

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

works for me.
when looking at the issue I also thought that maybe init_table_data could return an error when needs_free_entrie is true (in this case the file should exists, if it doesn't there was some file loss or an initialization problem).
(needs_free_entry is use with the order table where IIRC there is no lazy table init)

@MattHalpinParity
Copy link
Contributor Author

works for me. when looking at the issue I also thought that maybe init_table_data could return an error when needs_free_entrie is true (in this case the file should exists, if it doesn't there was some file loss or an initialization problem). (needs_free_entry is use with the order table where IIRC there is no lazy table init)

I think it should skip reading the file if it's missing so avoiding the None issue.

@MattHalpinParity MattHalpinParity merged commit a54e6cf into paritytech:master Jul 29, 2024
9 checks passed
@MattHalpinParity MattHalpinParity deleted the propagate_errors branch July 29, 2024 18:14
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.

3 participants