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

fix(tsdb): incorrect error type in type switch #16411

Merged
merged 1 commit into from
Feb 26, 2020

Conversation

foobar
Copy link
Contributor

@foobar foobar commented Jan 6, 2020

With 0ccea81, it should be checking PartialWriteError instead of *PartialWriteError

@foobar foobar requested a review from e-dard February 12, 2020 09:17
@foobar
Copy link
Contributor Author

foobar commented Feb 12, 2020

@e-dard can you add 1.x label?

// Maybe we can just change it to be consistent if we change it also in all
// the places that construct it.
case *PartialWriteError:
case PartialWriteError:
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a unit test somewhere that can cover this?

Copy link
Contributor Author

@foobar foobar Feb 13, 2020

Choose a reason for hiding this comment

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

Seems no yet, for the error type. I will add a test case in index/inmem since this error is only populated from inmem index

With 0ccea81, it should be checking `PartialWriteError` instead of `*PartialWriteError`
@foobar
Copy link
Contributor Author

foobar commented Feb 25, 2020

@e-dard can you take a look at the updated version?

@e-dard e-dard self-requested a review February 25, 2020 14:59
Copy link
Contributor

@e-dard e-dard left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @foobar.

@dgnorton dgnorton self-requested a review February 25, 2020 16:50
@dgnorton dgnorton merged commit 233490e into influxdata:1.7 Feb 26, 2020
@dgnorton
Copy link
Contributor

@foobar thanks. Would you mind cherry-picking this to the 1.8 branch also?

@dgnorton
Copy link
Contributor

Issue for forward porting this fix to 1.8: #17020

@foobar foobar deleted the fix-error-type branch February 27, 2020 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants