Description
When a long-running task or timer is initiated, we should suppress the flow of the ExecutionContext. Not doing so can cause a myriad of strange problems or memory leaks.
Some example locations (though we should check for more):
https://github.com/couchbase/couchbase-net-client/blob/master/src/Couchbase/Core/Diagnostics/Tracing/OrphanResponseReporting/OrphanReporter.cs#L47
https://github.com/couchbase/couchbase-net-client/blob/master/src/Couchbase/Core/Diagnostics/Tracing/ThresholdTracing/ThresholdTraceListener.cs#L26
For reference:
https://siderite.dev/blog/timers-that-capture-execution-context.html
https://forums.couchbase.com/t/executioncontext-should-be-suppressed-loggerfactory-injection/31741
Attachments
For Gerrit Dashboard: NCBC-2965 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
161775,6 | NCBC-2965 Don't capture execution context for long-running tasks/timers | master | couchbase-net-client | Status: MERGED | +2 | +1 |