From 6a58bc949b7aeeecb8741856599b5addb2a81767 Mon Sep 17 00:00:00 2001 From: Aleksei Pleshakov Date: Tue, 7 Jan 2025 17:13:19 +0100 Subject: [PATCH 1/2] fix panic in span reporting --- CHANGELOG.md | 3 +++ internal/xsql/legacy/tx.go | 4 ++++ internal/xsql/tx.go | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6772bb342..00c93592a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## v3.95.6 +* Fixed panic on span reporting in `xsql/Tx` + ## v3.95.5 * Fixed goroutine leak on failed execute call in query client diff --git a/internal/xsql/legacy/tx.go b/internal/xsql/legacy/tx.go index 7aba57197..a1ec1fdf1 100644 --- a/internal/xsql/legacy/tx.go +++ b/internal/xsql/legacy/tx.go @@ -20,6 +20,10 @@ type transaction struct { } func (tx *transaction) ID() string { + if tx.tx == nil { + return "" + } + return tx.tx.ID() } diff --git a/internal/xsql/tx.go b/internal/xsql/tx.go index 35a395e78..1f9f386b9 100644 --- a/internal/xsql/tx.go +++ b/internal/xsql/tx.go @@ -18,6 +18,10 @@ type Tx struct { } func (tx *Tx) ID() string { + if tx.tx == nil { + return "" + } + return tx.tx.ID() } From ceeaf4de908253e86d3f6fe1b821514a19d3fb3e Mon Sep 17 00:00:00 2001 From: Timofey Koolin Date: Wed, 8 Jan 2025 16:08:10 +0300 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00c93592a..dcf54eb37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,3 @@ -## v3.95.6 * Fixed panic on span reporting in `xsql/Tx` ## v3.95.5