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

Snapshot() Function Does Not Return An Error When It Fails #749

Closed
4 tasks done
tkxkd0159 opened this issue Oct 25, 2022 · 0 comments
Closed
4 tasks done

Snapshot() Function Does Not Return An Error When It Fails #749

tkxkd0159 opened this issue Oct 25, 2022 · 0 comments
Assignees

Comments

@tkxkd0159
Copy link
Member

tkxkd0159 commented Oct 25, 2022

Summary

The function defined as func (app *BaseApp) snapshot(height int64) does not return an error when the snapshot creation process fails. It silently handles the error without notifying the caller about it.

This function was moved at cosmos/cosmos-sdk#11496, osmosis-labs/cosmos-sdk#140. Snapshot functionality is managed through a manager pattern.

Snapshot Manager manages snapshot and restore operations for an app, making sure only a single long-running operation is in progress at any given time, and provides convenience methods mirroring the ABCI interface.

Version

Result

func (app *BaseApp) snapshot(height int64) is executed in ABCI Commit as goroutine. The success of commit should not depend on the success of snapshot functionality, so cosmos-sdk just records snapshot's error and return nothing. Because even we return error through go channel, there is nothing to do. So I will close this issue without fix.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@tkxkd0159 tkxkd0159 self-assigned this Oct 25, 2022
@tkxkd0159 tkxkd0159 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant