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

Actually bulk load documents in one query in bulkLoad #1124

Merged
merged 3 commits into from
Jun 8, 2022

Conversation

olovy
Copy link
Contributor

@olovy olovy commented Jun 7, 2022

  • Use whelk.bulkLoad when loading data for Normalizers
  • Actually bulk load documents in one query in bulkLoad

This cuts the normalizer initialization part of of Whelk startup from ~20 to ~2 seconds when connecting to e.g. QA database from my laptop over VPN.

@olovy olovy requested review from niklasl, andersju and lrosenstrom June 7, 2022 15:36
@@ -511,6 +511,10 @@ class JsonLd {
return (o instanceof List) ? (List) o : o != null ? [o] : []
}

static boolean looksLikeIri(String s) {
Copy link
Contributor Author

@olovy olovy Jun 8, 2022

Choose a reason for hiding this comment

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

From #1009

whelk-core/src/main/groovy/whelk/Whelk.groovy Show resolved Hide resolved
@olovy olovy force-pushed the feature/bulk-load branch from ec7f4be to b5e8477 Compare June 8, 2022 08:36
Copy link
Member

@andersju andersju left a comment

Choose a reason for hiding this comment

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

Nice! LGTM!

@olovy
Copy link
Contributor Author

olovy commented Jun 8, 2022

In theory this could starve the connection pool since the connection is held for one larger query. We have a limit of 100 docs in place in reindex so it should be fine.

Fix this when we split the connection pool in two for fast and slow transactions.

@olovy olovy merged commit ecaae76 into develop Jun 8, 2022
@olovy olovy deleted the feature/bulk-load branch June 8, 2022 13:00
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.

2 participants