ZOOKEEPER-4549: ProviderRegistry may be repeatedly initialized
We run two ZooKeeperServerEmbedded in one JVM and find that ProviderRegistry was initialized repeatedly.
@lanicc Thanks for your contribution.
- @lanicc Oops, the PR had caused this flaky test (https://github.com/apache/zookeeper/runs/6935237282?check_suite_focus=true) after I merged it. Cc @eolivelli @tisonkun
- Strangely, why I don't have seen this obvious flaky test when I re-trigger the CI?
@maoling yeah..That's a mistake since this is not a singleton pattern.
I think we should revert this change.
- @lanicc Oops, the PR had caused this flaky test (https://github.com/apache/zookeeper/runs/6935237282?check_suite_focus=true) after I merged it. Cc @eolivelli @tisonkun
- Strangely, why I don't have seen this obvious flaky test when I re-trigger the CI?
Each zkServer should hold a single ProviderRegistry object instead of sharing one. It's right? @maoling @tisonkun
in tests we start multiple ZK servers. using static variables makes it a mess to run such kinds of tests. we should git revert this patch and find a different fix
@maoling
@maoling How should we deal with this problem?