Skip to content

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

Merged
dweitzman merged 1 commit intovitessio:masterfrom
mingjianliu:upstream2
Mar 17, 2020
Merged

vtgate: list only the problem values when insert fails due to vindex.Verify#5896
dweitzman merged 1 commit intovitessio:masterfrom
mingjianliu:upstream2

Conversation

@mingjianliu
Copy link
Copy Markdown

@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
Copy Markdown
Collaborator

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator

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.

4 participants