-
Notifications
You must be signed in to change notification settings - Fork 489
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
Added boundaries to re-index parameters #2103
Added boundaries to re-index parameters #2103
Conversation
Added Unit tests
@@ -220,6 +220,11 @@ public override void OnActionExecuted(ActionExecutedContext context) | |||
} | |||
} | |||
} | |||
else if (context.Exception is ArgumentOutOfRangeException argumentOutOfRangeException) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BadRequestException makes sense. Another possible option is a new Exception type which extends ArgumentOutOfRange.
src/Microsoft.Health.Fhir.Core/Features/Operations/Reindex/Models/ReindexJobRecord.cs
Outdated
Show resolved
Hide resolved
|
||
set | ||
{ | ||
if (value < 1 || value > 5000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
set | ||
{ | ||
if (value > 10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
Added boundaries to ReIndex parameters
Added Unit tests
Currently, we have below ranges for different parameters based on prior experience. ( discussion with Jared )
MaximumConcurrency: 10
QueryDelayIntervalInMilliseconds: 5 - 500000
MaximumNumberOfResourcesPerQuery: 1 - 5000
TargetDataStoreUsagePercentage: 0 - 100
Related issues
Addresses [#81246].
Testing
Unite Test
FHIR Team Checklist
Semver Change (docs)
Patch|Skip|Feature|Breaking (reason)