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

Removes sql retry on upsert #2571

Merged
merged 1 commit into from
May 2, 2022

Conversation

brendankowitz
Copy link
Member

Description

Removes Retry on sql command for Upsert. The error still occurs, but data is saved correctly in success cases.

Related issues

Addresses [issue #].

Testing

Manual testing using faults inserted into SQL Proc.
image
image

FHIR Team Checklist

  • Update the title of the PR to be succinct and less than 50 characters
  • Add a milestone to the PR for the sprint that it is merged (i.e. add S47)
  • Tag the PR with the type of update: Bug, Dependencies, Enhancement, or New-Feature
  • Tag the PR with Azure API for FHIR if this will release to the Azure API for FHIR managed service (CosmosDB or common code related to service)
  • Tag the PR with Azure Healthcare APIs if this will release to the Azure Healthcare APIs managed service (Sql server or common code related to service)
  • CI is green before merge
  • Review squash-merge requirements

Semver Change (docs)

Patch

@brendankowitz brendankowitz requested a review from a team as a code owner April 27, 2022 07:16
@brendankowitz brendankowitz force-pushed the personal/bkowitz/sql-rawresource-fix branch from c782383 to eee46ea Compare April 27, 2022 07:37
using (SqlConnectionWrapper sqlConnectionWrapper = await _sqlConnectionWrapperFactory.ObtainSqlConnectionWrapperAsync(cancellationToken, true))
using (SqlCommandWrapper sqlCommandWrapper = sqlConnectionWrapper.CreateRetrySqlCommand())
using (SqlCommandWrapper sqlCommandWrapper = sqlConnectionWrapper.CreateNonRetrySqlCommand())
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this the only command that need retry disabled? We use this in a lot of places.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Taking a quick look I think we should also disallow retries in the SqlServerTaskManager line 39, SqlServerContextUpdater line 46, SqlServerTaskConsumer lines 52, 172, and 229, SqlServerFhirOperationsDataStore lines 57, 130, 200, 249, SqlServerFhirModel lines 227 and 373, SqlServerFhirDataStore lines 498 and 615, and SqlServerSearchParameterStatusDataStore line 205.

Copy link
Collaborator

Choose a reason for hiding this comment

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

All the commands above are creating or updating resources, so they could have the same stream issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

Its only a problem if we use Stream

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this is ok to merge. Of all the other instances I've checked, RawResource is the only instance I can see that uses VarBinary / Stream. VarChar / String is fine

@brendankowitz brendankowitz merged commit 7640b76 into main May 2, 2022
@brendankowitz brendankowitz deleted the personal/bkowitz/sql-rawresource-fix branch May 2, 2022 16:40
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.

3 participants