-
Notifications
You must be signed in to change notification settings - Fork 35
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
[BUG] Data race if the provider set few times #307
Comments
Hey @erka, could you please try the test provider and see if that resolves your issue? |
@beeme1mr I am trying to implement the provider and write some e2e tests for it. Using another provider doesn't help much. The issue is related to the providers which implement |
In the next release, stage management moves to the provider. This is a non-breaking change but may address this problem. FYI @toddbaert |
There have been substantial changes to the SDK recently like @beeme1mr said, which are yet unreleased. The changes are significant enough that there's a chance this bug could be resolved. I would have liked to see the released already but there's a few more issues we have to iron out with it, namely the one you pointed out here: #296 (review) |
Just keep this alive, the release 1.14.0 doesn't fix the issue. go-sdk uses |
Thanks for the update @erka ! If you have some ideas for a fix, I'm open to that. Otherwise, we have some pressing issues internally so I probably won't be able to dig into this until next week. 🙏 |
Hi @toddbaert, we're having the same issue with our project. I think that just running cc @rdimitrov |
@blkt i gave it a quick shot and it seems to fix the problem. At least all tests pass, even with the race detector enabled. Cool.
@erka yea using
|
@warber We could add a |
I'll give this a shot this week unless I see a PR from somebody else first. |
My findings so far:
go func(forShutdown StateHandler) {
api.mu.RLock()
defer api.mu.RUnlock()
forShutdown.Shutdown()
}(v)
|
I'm going to give this a shot. Somebody stop me if you think I'm barking up the wrong tree. |
Observed behavior
I have several tests with a similar setup: the provider is created, then configured, the tests are executed, and
openfeature.Shutdown()
is called for cleanup. However, when these tests are run with the race detector enabled, they consistently fail.Expected Behavior
No response
Steps to reproduce
Create a file with test and run
go test -race ./...
The text was updated successfully, but these errors were encountered: