Race in easy_logging.go
introduced in v1.8.0
#1059
Labels
bug
Erroneous or unexpected behaviour
status-pr_pending_merge
A PR is made and is under review
status-triage_done
Initial triage done, will be further handled by the driver team
v1.8.0 (v1.7.2 works)
macOS 14.2.1, arm64
1.21.3, 1.22.0
4.Server version:* E.g. 1.90.1
N/A
Connected to Snowflake in more than one thread
No data to be shared across the instances. Potentially shared data should be thread safe.
N/A
N/A
Reproducible exampel
go get -u github.com/snowflakedb/[email protected]
go test . -race
with amain_test.go
containing:Output
Root cause
The public shared variable here:
gosnowflake/easy_logging.go
Lines 19 to 23 in 9534520
Is read from without any mutex here:
gosnowflake/easy_logging.go
Line 120 in 9534520
Is written to without any mutex here:
gosnowflake/easy_logging.go
Line 26 in 9534520
Somewhat related to #616 and another reason to drop logging from the library and leave that to the caller.
The text was updated successfully, but these errors were encountered: