zijin-m edited a comment on pull request #27: URL: https://github.com/apache/skywalking-nodejs/pull/27#issuecomment-768211935
> > After testing, if two requests are repeatedly sent in a short time, the subsequent requests may use the `AsyncState` initialized by the previous request. It is temporarily unclear why `store.enterWith(undefined as unknown as AsyncState)` in the `clear` method not work(The store cannot be reset), I tried to add an `invalid` flag, which works normally, I hope to discuss the feasibility of this implementation with you, thx > > Also, I don't see `asyncState.context.invalid` being cleared again after this, which would mean that once a ContextManager is marked invalid then all new subsequent `Span`s will get a clean `SpanContext` and the parent chain will be broken? According to my understanding, it will not be broken in theory, because it will be marked only when the trace ends. The subsequent span should use the new trace. Could it be said that after the `segment-finished` event is triggered, there are sub spans that have not ended or were create? Similarly, I think the role of the invalid tag is the same as store.enterWith(undefined as unknown as AsyncState), both get a clean SpanContext , Is it my understanding? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
