zookeeper icon indicating copy to clipboard operation
zookeeper copied to clipboard

ZOOKEEPER-4549: ProviderRegistry may be repeatedly initialized

Open lanicc opened this issue 3 years ago • 6 comments

We run two ZooKeeperServerEmbedded in one JVM and find that ProviderRegistry was initialized repeatedly.

lanicc avatar May 26 '22 08:05 lanicc

@lanicc Thanks for your contribution.

maoling avatar Jun 17 '22 11:06 maoling

  • @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 avatar Jun 19 '22 13:06 maoling

@maoling yeah..That's a mistake since this is not a singleton pattern.

I think we should revert this change.

tisonkun avatar Jun 19 '22 14:06 tisonkun

  • @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

lanicc avatar Jun 19 '22 16:06 lanicc

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

eolivelli avatar Jun 20 '22 10:06 eolivelli

@maoling How should we deal with this problem?

lanicc avatar Jul 01 '22 06:07 lanicc