Skip to content

Commit 22bd493

Browse files
authored
Merge pull request #1601 from ydb-platform/fix-span-panic
fix panic in span reporting
2 parents 4068af9 + ceeaf4d commit 22bd493

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
* Fixed panic on span reporting in `xsql/Tx`
2+
13
## v3.95.5
24
* Fixed goroutine leak on failed execute call in query client
35

internal/xsql/legacy/tx.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ type transaction struct {
2020
}
2121

2222
func (tx *transaction) ID() string {
23+
if tx.tx == nil {
24+
return ""
25+
}
26+
2327
return tx.tx.ID()
2428
}
2529

internal/xsql/tx.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ type Tx struct {
1818
}
1919

2020
func (tx *Tx) ID() string {
21+
if tx.tx == nil {
22+
return ""
23+
}
24+
2125
return tx.tx.ID()
2226
}
2327

0 commit comments

Comments
 (0)