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

fix: Tenanted bulk loading should consider tenant id as part of document identity #3297

Merged

Conversation

elexisvenator
Copy link
Contributor

This fixes 2 issues:

  • A massive performance issue where not joining or updating on tenant id meant that no index could be used
  • The bug where if the same Id exists in multiple tenants then an update would happen instead of an insert.

Also has a small tweak to calling binay import to use the async method where appropriate.

@elexisvenator
Copy link
Contributor Author

I also have an extension of this branch that changes the logic to use a single insert .. on conflict do update to make the merge quicker.

@elexisvenator
Copy link
Contributor Author

Another bug that I haven't addressed as its more programmer error: There are no checks in place to ensure that a tenant is specified when the bulk imported document uses conjoined tenancy. Tenancy defaults to default but given how low level this op is it's probably worth requiring the use of default tenant to be explicit.

@jeremydmiller jeremydmiller merged commit 4ea7c8b into JasperFx:master Jul 8, 2024
10 of 11 checks passed
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.

None yet

2 participants