-
Notifications
You must be signed in to change notification settings - Fork 317
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
chore: moving uploadSchema into UploadJob #3888
chore: moving uploadSchema into UploadJob #3888
Conversation
9a422d3
to
a4dbf64
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #3888 +/- ##
==========================================
+ Coverage 69.20% 69.26% +0.06%
==========================================
Files 353 353
Lines 53021 53018 -3
==========================================
+ Hits 36694 36724 +30
+ Misses 14023 13989 -34
- Partials 2304 2305 +1
☔ View full report in Codecov by Sentry. |
// TableSchemaDiff returns the diff between the warehouse schema and the upload schema | ||
func (sh *Schema) TableSchemaDiff(tableName string, tableSchema model.TableSchema) whutils.TableSchemaDiff { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are calculating diff, it feels more intuitive to have the first parameter as schema and the second as tableName? wdyt?
// TableSchemaDiff returns the diff between the warehouse schema and the upload schema | |
func (sh *Schema) TableSchemaDiff(tableName string, tableSchema model.TableSchema) whutils.TableSchemaDiff { | |
// TableSchemaDiff returns the diff between the warehouse schema and the upload schema | |
func (sh *Schema) TableSchemaDiff(tableSchema model.TableSchema, tableName string) whutils.TableSchemaDiff { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you just suggesting to have the tableSchema
as the first parameter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
Description
Sub issue for the Warehouse integration tests with
-race
.The plan is to incrementally reintroduce the changes in smaller PRs to better test the changes in isolation.
In this Pull Request we are moving the
uploadSchema
out the schema handle and in theUploadJob
.It is recommended to review this PR commit by commit to simplify the review.
Sidenotes
uploadSchema
does not need a lock for concurrent writes/reads, see dependency map belowUploadSchema dependency map
Upload.UploadSchema READS
upload.go
internal/loadfiles/loadfiles.go
internal/repo/upload.go
Upload.UploadSchema WRITES
router_identities.go
upload.go
concurrent reads
Linear Ticket
< Linear Link >
Security