-
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.
Vttablet schema tracking: Fix _vt.schema_version corruption (#13045)
* 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 <[email protected]> * 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 <[email protected]> * reorganize imports and allocate slices with make Signed-off-by: Austen Lacy <[email protected]> * gofmt Signed-off-by: Austen Lacy <[email protected]> * flakey unit test Signed-off-by: Austen Lacy <[email protected]> * 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 <[email protected]> * Use DBName and not keyspace name while getting extended field info! Signed-off-by: Rohit Nayak <[email protected]> * Fix TestVStreamSharded Signed-off-by: Rohit Nayak <[email protected]> --------- Signed-off-by: Brendan Dougherty <[email protected]> Signed-off-by: Austen Lacy <[email protected]> Signed-off-by: Rohit Nayak <[email protected]> Co-authored-by: Austen Lacy <[email protected]> Co-authored-by: Rohit Nayak <[email protected]>
- Loading branch information
Showing
7 changed files
with
115 additions
and
77 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
Oops, something went wrong.