-
Notifications
You must be signed in to change notification settings - Fork 312
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: separate dataset index creation #4710
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4710 +/- ##
==========================================
+ Coverage 74.60% 74.81% +0.20%
==========================================
Files 414 414
Lines 48541 48554 +13
==========================================
+ Hits 36215 36324 +109
+ Misses 9953 9876 -77
+ Partials 2373 2354 -19 ☔ View full report in Codecov by Sentry. |
7df7cd1
to
dd4a3cb
Compare
jobsdb/jobsdb.go
Outdated
if err = jd.createDSTablesInTx(ctx, tx, newDS); err != nil { | ||
return err | ||
} | ||
if err = jd.createDSIndicesInTx(ctx, tx, newDS); err != nil { | ||
return err | ||
} |
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.
Should we add some error context here?
if err = jd.createDSTablesInTx(ctx, tx, newDS); err != nil { | |
return err | |
} | |
if err = jd.createDSIndicesInTx(ctx, tx, newDS); err != nil { | |
return err | |
} | |
if err = jd.createDSTablesInTx(ctx, tx, newDS); err != nil { | |
return fmt.Errorf("creating DS tables %w", err) | |
} | |
if err = jd.createDSIndicesInTx(ctx, tx, newDS); err != nil { | |
return fmt.Errorf("creating DS indices %w", err) | |
} |
return nil | ||
} | ||
|
||
func (jd *Handle) createDSIndicesInTx(ctx context.Context, tx *Tx, newDS dataSetT) error { |
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.
Should we add more context around the error branches? Same for createDSTablesInTx
as well.
This PR is considered to be stale. It has been open 20 days with no further activity thus it is going to be closed in 7 days. To avoid such a case please consider removing the stale label manually or add a comment to the PR. |
Description
Separate out index creation for jobsdb datasets. Motivation stemmed from wanting to create indices after jobs are copied during migration(src). Includes foreign key constraint.
Removed
addDS
journal entry during migration. Which imo is fine considering themigrateDS
entry contains info about the created dataset.Linear Ticket
Resolves PIPE-1072
Security