Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data race on Publish for Google pubsub #432

Open
tsurunoyu opened this issue Apr 11, 2024 · 0 comments
Open

Data race on Publish for Google pubsub #432

tsurunoyu opened this issue Apr 11, 2024 · 0 comments

Comments

@tsurunoyu
Copy link

Running code with -race that publishes from multiple goroutines at the same time:

WARNING: DATA RACE
Write at 0x00c002c291d8 by goroutine 1498:
  github.com/ThreeDotsLabs/watermill-googlecloud/pkg/googlecloud.(*Publisher).Publish()
      github.com/ThreeDotsLabs/watermill-googlecloud@v1.1.0/pkg/googlecloud/publisher.go:149 +0xe4
[...]

Previous write at 0x00c002c291d8 by goroutine 1439:
  github.com/ThreeDotsLabs/watermill-googlecloud/pkg/googlecloud.(*Publisher).Publish()
      github.com/ThreeDotsLabs/watermill-googlecloud@v1.1.0/pkg/googlecloud/publisher.go:149 +0xe4
[...]

Line 149 is:

t.EnableMessageOrdering = p.config.EnableMessageOrdering

which is a write to a shared Topic without synchronization.

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

No branches or pull requests

1 participant