Skip to content

Some errors are ignored, is that ok? #1041

@ylsGit

Description

@ylsGit

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions