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

vtgate: list only the problem values when insert fails due to vindex.Verify #5896

Merged
merged 1 commit into from Mar 17, 2020

Conversation

mingjianliu
Copy link

@mingjianliu mingjianliu commented Mar 6, 2020

vtgate: list only the problem values when insert fails due to vindex.Verify

Before this change a batch insert failure due to a vindex Verify error would include all the values given for the vindex column for all rows inserted: both valid and invalid.

That can be confusing when many or most values are valid. Even if you understand that some values are valid in the error, sorting out the valid vs invalid values from the error message can be a pain.

Printing only the invalid values makes the error much more clear.

Signed-off-by: Mingjian Liu mingjianliu@pinterest.com

Signed-off-by: Mingjian Liu <mingjianliu@pinterest.com>
@mingjianliu mingjianliu requested a review from sougou as a code owner March 6, 2020 04:34
@dweitzman
Copy link
Member

dweitzman commented Mar 8, 2020

The change looks good to me. Maybe the commit/PR description could be more descriptive? As an example:

vtgate: list only the problem values when insert fails due to vindex.Verify

Before this change a batch insert failure due to a vindex Verify error would include all the values given for the vindex column for all rows inserted: both valid and invalid.

That can be confusing when many or most values are valid. Even if you understand that some values are valid in the error, sorting out the valid vs invalid values from the error message can be a pain.

Printing only the invalid values makes the error much more clear.

Copy link
Member

@harshit-gangal harshit-gangal left a comment

Choose a reason for hiding this comment

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

LGTM

@mingjianliu mingjianliu changed the title Add more log when Insertion failed on Map vtgate: list only the problem values when insert fails due to vindex.Verify Mar 10, 2020
@mingjianliu
Copy link
Author

The change looks good to me. Maybe the commit/PR description could be more descriptive? As an example:

vtgate: list only the problem values when insert fails due to vindex.Verify
Before this change a batch insert failure due to a vindex Verify error would include all the values given for the vindex column for all rows inserted: both valid and invalid.
That can be confusing when many or most values are valid. Even if you understand that some values are valid in the error, sorting out the valid vs invalid values from the error message can be a pain.
Printing only the invalid values makes the error much more clear.

Thank you so much for that! I just copied your description this time. Learned from it!

@deepthi
Copy link
Member

deepthi commented Mar 16, 2020

@dweitzman @harshit-gangal this PR has been approved but not merged. Is there a reason it has been kept open?

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

Successfully merging this pull request may close these issues.

None yet

4 participants