Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: child span not acquiring transaction lock in some cases (#1487)
* fix: acquire lock before adding dropped spans Spans from the same transaction share the dropped spans map. If they end concurrency a race condition could happen when updating the map. Add a RW lock to prevent that. * Revert "fix: acquire lock before adding dropped spans" This reverts commit 7fe3968. * fix: child span not acquiring transaction lock in some cases The previous fix didn't cover all cases. The issue is deeper and affects more than the transaction data. We need to always acquire the tx lock before ending the span. * test: add test case for dropped spans race condition * fix: also acquire transactiondata lock Co-authored-by: Marc Lopez Rubio <marc5.12@outlook.com> * test: end parent and transaction Co-authored-by: Marc Lopez Rubio <marc5.12@outlook.com> * test: close tracer once test ends Co-authored-by: Marc Lopez Rubio <marc5.12@outlook.com> --------- Co-authored-by: Marc Lopez Rubio <marc5.12@outlook.com>
- Loading branch information