You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When testing with 200 ingestion threads processing new resources, congestion was observed on inserts into the new common_token_values table (issue #1366) .
To Reproduce
Generate a new set of synthetic patient data in COS.
Run fhir-bucket to load the new data.
Observe ingestion performance.
Expected behavior
Better throughput scaling as ingestion thread-count increases.
Additional context
Contention occurs when the same new reference value appears in more than one bundle, and those bundles are processed in parallel. It takes a few seconds to process each bundle and this means that the insert into common_token_values may be blocked for a while until the competing transaction commits. The solution is to capture all the required inserts into this table for the whole transaction, then insert them just prior to the transaction commit. This means fewer round-trips to the database, as well as significantly reducing the amount of time the exclusive locks are held.
The text was updated successfully, but these errors were encountered:
Describe the bug
When testing with 200 ingestion threads processing new resources, congestion was observed on inserts into the new common_token_values table (issue #1366) .
To Reproduce
Generate a new set of synthetic patient data in COS.
Run fhir-bucket to load the new data.
Observe ingestion performance.
Expected behavior
Better throughput scaling as ingestion thread-count increases.
Additional context
Contention occurs when the same new reference value appears in more than one bundle, and those bundles are processed in parallel. It takes a few seconds to process each bundle and this means that the insert into common_token_values may be blocked for a while until the competing transaction commits. The solution is to capture all the required inserts into this table for the whole transaction, then insert them just prior to the transaction commit. This means fewer round-trips to the database, as well as significantly reducing the amount of time the exclusive locks are held.
The text was updated successfully, but these errors were encountered: