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

Some errors are ignored, is that ok? #1041

Open
ylsGit opened this issue Feb 6, 2025 · 0 comments
Open

Some errors are ignored, is that ok? #1041

ylsGit opened this issue Feb 6, 2025 · 0 comments

Comments

@ylsGit
Copy link

ylsGit commented Feb 6, 2025

I've noticed that there is some ERROR being ignored here

func (node *Node) traverseInRange(tree *ImmutableTree, start, end []byte, ascending bool, inclusive bool, post bool, cb func(*Node) bool) bool {
	stop := false
	t := node.newTraversal(tree, start, end, ascending, inclusive, post)
	// TODO: figure out how to handle these errors
	for node2, err := t.next(); node2 != nil && err == nil; node2, err = t.next() {
		stop = cb(node2)
		if stop {
			return stop
		}
	}
	return stop
}

Is it normal that some errors from GetNode, especially fmt.Errorf("Value missing for key %v corresponding to nodeKey %x", nk, nodeKey) will not be processed? Is it expected?

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

No branches or pull requests

1 participant