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

[1.x,2.x] Respect errors in array cursors - TSM cleanup #24789

Closed
davidby-influx opened this issue Mar 19, 2024 · 0 comments
Closed

[1.x,2.x] Respect errors in array cursors - TSM cleanup #24789

davidby-influx opened this issue Mar 19, 2024 · 0 comments
Assignees
Labels
1.x area/queries area/2.x OSS 2.0 related issues and PRs kind/bug

Comments

@davidby-influx
Copy link
Contributor

Errors in array cursors are ignored in many situations.

The function signatures for calls that are currently masking errors need to return those errors, and the errors need to be checked in calling functions.

  • Ignoring errors here and here
  • reset needs to return an error which is respected and passed back here
  • Next does return an error, but it is always nil in the current code, regardless of underlying errors
  • Unfortunately, the caller of arrayCursorIterator.Next also ignores any error returned by that function
  • Instead, we should set c.err with the error.

This failure path is the root cause of this panic

@davidby-influx davidby-influx added area/queries 1.x area/2.x OSS 2.0 related issues and PRs labels Mar 19, 2024
@davidby-influx davidby-influx changed the title respect errors in array cursors - TSM cleanup [1.x,2.x] Respect errors in array cursors - TSM cleanup Mar 19, 2024
davidby-influx added a commit that referenced this issue Mar 26, 2024
ArrayCursors were ignoring errors, which led to panics when nil
cursors were operated on. This fix passes errors back up the stack
and uses them to enforce healthy cursor creation.

Closes #24789
---------
Co-authored-by: Stuart Carnie <[email protected]>
davidby-influx added a commit that referenced this issue Mar 26, 2024
ArrayCursors were ignoring errors, which led to panics when nil
cursors were operated on. This fix passes errors back up the stack
and uses them to enforce healthy cursor creation.

Closes #24789
---------
Co-authored-by: Stuart Carnie <[email protected]>

(cherry picked from commit fe6c64b)

closes #24836
davidby-influx added a commit that referenced this issue Mar 26, 2024
ArrayCursors were ignoring errors, which led to panics when nil
cursors were operated on. This fix passes errors back up the stack
and uses them to enforce healthy cursor creation.

Closes #24789
---------
Co-authored-by: Stuart Carnie <[email protected]>

(cherry picked from commit fe6c64b)

closes #24836
davidby-influx added a commit that referenced this issue Mar 27, 2024
ArrayCursors were ignoring errors, which led to panics when nil
cursors were operated on. This fix passes errors back up the stack
and uses them to enforce healthy cursor creation.

Closes #24789
---------
Co-authored-by: Stuart Carnie <[email protected]>

(cherry picked from commit fe6c64b)

closes #24836

(cherry picked from commit 49d0bef)

closes #24826
davidby-influx added a commit that referenced this issue Mar 27, 2024
ArrayCursors were ignoring errors, which led to panics when nil
cursors were operated on. This fix passes errors back up the stack
and uses them to enforce healthy cursor creation.

Closes #24789
---------
Co-authored-by: Stuart Carnie <[email protected]>

(cherry picked from commit fe6c64b)

closes #24836

(cherry picked from commit 49d0bef)

closes #24826
davidby-influx added a commit that referenced this issue Apr 5, 2024
ArrayCursors were ignoring errors, which led to panics when nil
cursors were operated on. This fix passes errors back up the stack
and uses them to enforce healthy cursor creation.

Closes #24789
---------
Co-authored-by: Stuart Carnie <[email protected]>

(cherry picked from commit fe6c64b)

closes #24824
davidby-influx added a commit that referenced this issue Apr 8, 2024
ArrayCursors were ignoring errors, which led to panics when nil
cursors were operated on. This fix passes errors back up the stack
and uses them to enforce healthy cursor creation.

Closes #24789

Co-authored-by: Stuart Carnie <[email protected]>

(cherry picked from commit fe6c64b)

closes #24824
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x area/queries area/2.x OSS 2.0 related issues and PRs kind/bug
Projects
None yet
Development

No branches or pull requests

2 participants