[release-15.0] Enable failures in tools/e2e_test_race.sh and fix races (#13654)#14009
Merged
frouioui merged 2 commits intorelease-15.0from Oct 2, 2023
Merged
[release-15.0] Enable failures in tools/e2e_test_race.sh and fix races (#13654)#14009frouioui merged 2 commits intorelease-15.0from
tools/e2e_test_race.sh and fix races (#13654)#14009frouioui merged 2 commits intorelease-15.0from
Conversation
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Contributor
Author
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
rohit-nayak-ps
approved these changes
Sep 18, 2023
* Copy fields from schema.Engine before modifying This fixes a race condition which caused protobuf marshaled schema data in _vt.schema_version rows to become corrupted when ColumnType was modified between the time when Field message sizes were calculated and when Field message data was written to the buffer. Signed-off-by: Brendan Dougherty <brendan.dougherty@shopify.com> * Acquire schema engine mutex while marshaling schema This change is purely defensive, but it may help avoid future race conditions caused by modifying shared schema structs while they are being marshaled to protobuf. Signed-off-by: Brendan Dougherty <brendan.dougherty@shopify.com> * reorganize imports and allocate slices with make Signed-off-by: Austen Lacy <austen.lacy@shopify.com> * gofmt Signed-off-by: Austen Lacy <austen.lacy@shopify.com> * flakey unit test Signed-off-by: Austen Lacy <austen.lacy@shopify.com> * Use common code to update column_type for both vstreamer and rowstream events in a thread-safe fashion. Fix related tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Use DBName and not keyspace name while getting extended field info! Signed-off-by: Rohit Nayak <rohit@planetscale.com> * Fix TestVStreamSharded Signed-off-by: Rohit Nayak <rohit@planetscale.com> --------- Signed-off-by: Brendan Dougherty <brendan.dougherty@shopify.com> Signed-off-by: Austen Lacy <austen.lacy@shopify.com> Signed-off-by: Rohit Nayak <rohit@planetscale.com> Co-authored-by: Austen Lacy <austen.lacy@shopify.com> Co-authored-by: Rohit Nayak <rohit@planetscale.com>
frouioui
approved these changes
Sep 18, 2023
brendar
reviewed
Sep 20, 2023
| for _, table := range se.tables { | ||
| dbSchema.Tables = append(dbSchema.Tables, newMinimalTable(table)) | ||
| } | ||
| return dbSchema.MarshalVT() |
Contributor
There was a problem hiding this comment.
@frouioui thanks for backporting this! Just wanted to note that in v15 (and v16) Vitess was still using proto.Marshal(dbSchema) rather than dbSchema.MarshalVT() for this. Not sure if it's important, or why the change was only made in later versions, but wanted to call it out in case we'd prefer to continue using proto.Marshal(dbSchema).
Member
There was a problem hiding this comment.
Thank you for mentioning this.
@rohit-nayak-ps do you think we should revert to proto.Marshal(dbSchema)?
Member
There was a problem hiding this comment.
Yes, good catch. To be consistent, we should just use proto.Marshal(dbSchema) in v15/v16.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This is a backport of #13654
Edit: this also backport #13045