File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change 11* Doesn't rollback a the transaction on the operation error in table service
2+ * Fixed concurrent map writes in metrics
23* Renamed method at experimental API reader.PopBatchTx to reader.PopMessagesBatchTx
34
45## v3.80.5
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package metrics
22
33import (
44 "strconv"
5+ "sync"
56
67 "github.com/ydb-platform/ydb-go-sdk/v3/internal/repeater"
78 "github.com/ydb-platform/ydb-go-sdk/v3/internal/xerrors"
@@ -26,6 +27,7 @@ func driver(config Config) (t trace.Driver) {
2627 az string
2728 }
2829 knownEndpoints := make (map [endpointKey ]struct {})
30+ endpointsMu := sync.RWMutex {}
2931
3032 t .OnConnInvoke = func (info trace.DriverConnInvokeStartInfo ) func (trace.DriverConnInvokeDoneInfo ) {
3133 var (
@@ -104,6 +106,8 @@ func driver(config Config) (t trace.Driver) {
104106
105107 return func (info trace.DriverBalancerUpdateDoneInfo ) {
106108 if config .Details ()& trace .DriverBalancerEvents != 0 {
109+ endpointsMu .Lock ()
110+ defer endpointsMu .Unlock ()
107111 balancerUpdates .With (map [string ]string {
108112 "cause" : eventType ,
109113 }).Inc ()
You can’t perform that action at this time.
0 commit comments