-
Notifications
You must be signed in to change notification settings - Fork 4
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
CORE-188: batch upsert tracing #3147
Conversation
for { | ||
_ <- traceDBIOWithParent("insertIntoScratchFunction", span)(_ => insertIntoScratchFunction()) | ||
numUpdates <- traceDBIOWithParent("updateInMasterAction", span)(_ => updateInMasterAction()) | ||
} yield numUpdates |
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.
the change from andThen
to for ... yield
ensures the second "updateInMasterAction" trace does not start eagerly
} | ||
} | ||
|
||
traceDBIOWithParent("saveAction", localContext)(_ => saveAction) | ||
saveAction |
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.
moving the trace wrapper up ensures it does not start eagerly
Ticket: https://broadworkbench.atlassian.net/browse/CORE-188
The batchUpsert API is used by TSV uploads, among others.
In this PR:
Before this PR
getActiveEntities
andsaveAction
subspans appear to start at the same time, which is incorrectLocalEntityProvider.batchUpdateEntitiesImpl
subspanAfter this PR:
LocalEntityProvider.batchUpdateEntitiesImpl
subspangetActiveEntities
andsaveAction
is more accuratePR checklist
model/
, then you should publish a new officialrawls-model
and updaterawls-model
in Orchestration's dependencies.