You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem
Currently, all the event type auto creation calls are blocking, increasing the end to end latency in the system. We should move these calls to being async in a separate goroutine.
I investigated this and ran into issues with the context being provided to the EventTypeAutoCreate function: even if you copy the context, when a parent context is cancelled the child is cancelled too. As far as I can see, there are two main approaches to solving this:
Create our own implementation of the context interface which supports a new context without the parent cancelling it
Wait until we have upgraded to go 1.21+ and use the context.WithoutCancel method which was recently added.
I think approach 2 is best, and we should aim to tackle this after upgrading our go version in the future.
I like the #2 option. Go 1.21 is just of the door now. IMO it's possible to upgrade for next or next+1 release.
I'd probably try to aim this enhancement to the Beta graduation/enabled by default phase. Once we got some feedback for the eventtype-auto-create from the field.
Problem
Currently, all the event type auto creation calls are blocking, increasing the end to end latency in the system. We should move these calls to being async in a separate goroutine.
I investigated this and ran into issues with the context being provided to the
EventTypeAutoCreate
function: even if you copy the context, when a parent context is cancelled the child is cancelled too. As far as I can see, there are two main approaches to solving this:context.WithoutCancel
method which was recently added.I think approach 2 is best, and we should aim to tackle this after upgrading our go version in the future.
Persona:
Which persona is this feature for?
Exit Criteria
A unit test showing that the event type is created in a non-blocking way
Time Estimate (optional):
1
Additional context (optional)
Add any other context about the feature request here.
The text was updated successfully, but these errors were encountered: