-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Is your feature request related to a problem? Please describe.
Addresses the issue with code change #7543
For an instance where multiple tasks are being submitted from a loop the parent span is getting wrongly set.
Example :-
Parent - A
for(int i=0; i<array["B", "C", "D", "E"].length; i++){
performPhaseOnShard(array[i]);
}
performPhaseOnShard executes the phase on the node where the shard is located, it could be locally or external data node. If we start a span from inside the performPhaseOnShard method, it creates the shard and sets this newly created span as a parent for the future spans. E.x here
- performPhaseOnShard for shard B will have parent span as
A. - performPhaseOnShard for shard C will have parent span as
B. Which is wrong and should ideally beA - Similarly, performPhaseOnShard for shard C will have a parent span as
C.
Describe the solution you'd like
Ideally we need to reset the context in this scenario, so Tracer should provide a new Releasable TracerContext which can be reset to the original one of releasing the current context.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.