microsoft / microsoft/fhir-server

Group export fails for large groups in Cosmos DB

Open
#2,056 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug VSTS-Backlog
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.