Skip to content
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

add limiter for no values to upsert #13650

Merged
merged 1 commit into from
Jun 21, 2024
Merged

Conversation

EasterTheBunny
Copy link
Contributor

Bulk upsert was attempting to run with an empty list, resulting in repeated errors. This fix does a length check before attempting to upsert.

Copy link
Contributor

I see you updated files related to core. Please run pnpm changeset in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

🎖️ No JIRA issue number found - Please include it in the PR title or in a commit message.

if len(values) == 0 {
return
}

if err := c.ORM.BulkUpsertBridgeResponse(context.Background(), values); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of scope, but we can do better than Background here. Let's circle back to upgrade the stop chan to a StopChan in order to spawn a Context to pass here (or from the caller).

@EasterTheBunny EasterTheBunny added this pull request to the merge queue Jun 21, 2024
Merged via the queue into develop with commit 1146ca9 Jun 21, 2024
111 of 112 checks passed
@EasterTheBunny EasterTheBunny deleted the bulk-upsert-length-limit branch June 21, 2024 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants