-
Notifications
You must be signed in to change notification settings - Fork 515
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
Conversation
c782383
to
eee46ea
Compare
using (SqlConnectionWrapper sqlConnectionWrapper = await _sqlConnectionWrapperFactory.ObtainSqlConnectionWrapperAsync(cancellationToken, true)) | ||
using (SqlCommandWrapper sqlCommandWrapper = sqlConnectionWrapper.CreateRetrySqlCommand()) | ||
using (SqlCommandWrapper sqlCommandWrapper = sqlConnectionWrapper.CreateNonRetrySqlCommand()) |
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.
Is this the only command that need retry disabled? We use this in a lot of places.
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.
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.
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.
All the commands above are creating or updating resources, so they could have the same stream issue.
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.
Its only a problem if we use Stream
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.
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
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.
FHIR Team Checklist
Semver Change (docs)
Patch