Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GOCBC-1135: Set net and cmd spans to nil on req cancellation
Motivation ---------- It's possible for a request cancel to race with a response completion. When this happens there is a gap on the memdclient side between releasing the request lock and setting request completion to 1. The same is effectively true for the opposite also, after we have handled cancelling a request we can continue handling it as an error case in the memdclient. The effect of this is that we end up cancelling the net and cmd traces twice. Changes ------- Update cancelReqTrace to call stopCmdTrace and stopNetTrace respectively so that relevant attributes are added to the spans and the cmd and net spans are then set to nil. Update StartNetTrace to lock around checking if the cmd trace is nil. Change-Id: Iff0c23266b57f236bf8c8a35fd5766fad823eefc Reviewed-on: http://review.couchbase.org/c/gocbcore/+/156991 Tested-by: Charles Dixon <chvckd@gmail.com> Reviewed-by: Brett Lawson <brett19@gmail.com>
- Loading branch information
Showing
2 changed files
with
16 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters