microsoft / microsoft/fhir-server
Group export fails for large groups in Cosmos DB
Nobody has claimed this yet.
- Dominant language
- TSQL
- Stars
- 1.4k
- Forks
- 592
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 41
Description
**Describe the bug**
Cosmos DB has a maximum character limit for queries. With the way group export is implemented currently it exceeds this limit if a group has more than ~4940 members. This triggers the export job to fail and an unknown error to be recorded as the reason.
**FHIR Version?**
Stu3/R4/R5
**Data provider?**
CosmosDB
**To Reproduce**
Steps to reproduce the behavior:
1. Create a group with 5000 members
2. Run a group export on the group
**Expected behavior**
The export completes successfully.
**Actual behavior**
The export fails and an unactionable error message is returned.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the Cosmos DB group export entry point and the query construction used for large groups, then reproduce the failure with a group containing 5,000 members. The work is done when the export completes successfully for large groups and the failure path no longer records only an unactionable unknown error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100