-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add vtgate and vttablet flag to truncate errors sent to client (#12899)
* Add vttablet flag `-queryserver-config-truncate-error-len`. Unlike vanilla MySQL, Vitess sometimes includes client SQL in error responses leading to potentially large response packets. This confuses some clients such as PHP's PDO driver. (A bug has been filed with PHP[0] for this behavior.) We avoid this edge case by truncating large error messages via this flag. [0] https://bugs.php.net/bug.php?id=78797 Signed-off-by: Adam Saponara <as@php.net> * Add vtgate flag `-vtgate-config-truncate-error-len` Signed-off-by: dleibovic <dleibovic@etsy.com> * Apply suggestions from code review Co-authored-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Signed-off-by: David Leibovic <david.leibovic@gmail.com> * updates from review: remove 'vtgate-config-' prefix to flag Signed-off-by: dleibovic <dleibovic@etsy.com> * updates from review: append '[TRUNCATED]' to truncated error messages Signed-off-by: dleibovic <dleibovic@etsy.com> * fixup merge Signed-off-by: dleibovic <dleibovic@etsy.com> * fixup formatting Signed-off-by: dleibovic <dleibovic@etsy.com> * WIP: updates from review. vterrors.TruncateError now returns an error rather than a string. Moved vtgate error truncation logic from to vtgate executor. Signed-off-by: dleibovic <dleibovic@etsy.com> * hopefully fix tests Signed-off-by: dleibovic <dleibovic@etsy.com> * updates from review: remove unecessary variable passing Signed-off-by: dleibovic <dleibovic@etsy.com> * fix whitspace Signed-off-by: dleibovic <dleibovic@etsy.com> --------- Signed-off-by: Adam Saponara <as@php.net> Signed-off-by: dleibovic <dleibovic@etsy.com> Signed-off-by: David Leibovic <david.leibovic@gmail.com> Signed-off-by: David Leibovic <dleibovic@etsy.com> Co-authored-by: Adam Saponara <as@php.net> Co-authored-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
- Loading branch information
1 parent
19366e7
commit 50d9fff
Showing
10 changed files
with
75 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters