Skip to content

sql: fix data race in TestIntegrationCosmosDB#4314

Merged
josephwoodward merged 1 commit intomainfrom
mmt/sql-fixes-v2
Apr 30, 2026
Merged

sql: fix data race in TestIntegrationCosmosDB#4314
josephwoodward merged 1 commit intomainfrom
mmt/sql-fixes-v2

Conversation

@mmatczuk
Copy link
Copy Markdown
Contributor

Commits

  • fix data race in TestIntegrationCosmosDB

Jira

  • CON-409

Skip TestIntegrationCosmosDB when running with the race detector.

The gocosmos driver depends on gjrc v0.2.2 which has a data race in
GjrcResponse.Body: it uses broken double-checked locking where the
outer nil check reads a shared field without the mutex while a
background goroutine (spawned eagerly by gjrc.buildResponse) writes
it under the mutex. This is a bug in the third-party library that
affects every gocosmos REST call and cannot be worked around.

gjrc v0.2.2 is the latest available version as of this commit.

Fixes CON-409
This was referenced Apr 20, 2026
@claude
Copy link
Copy Markdown

claude Bot commented Apr 20, 2026

Commits
LGTM

Review
Skips TestIntegrationCosmosDB under -race using a build-tag guarded raceDetectorEnabled constant, rationalized by a third-party data race in gjrc v0.2.2 that cannot be fixed locally.

LGTM

This was referenced Apr 20, 2026
@josephwoodward josephwoodward merged commit 3ecc439 into main Apr 30, 2026
6 checks passed
@josephwoodward josephwoodward deleted the mmt/sql-fixes-v2 branch April 30, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants