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

dubbo zookeeper registry too slow #4828

Closed
2 tasks
qixiaobo opened this issue Aug 14, 2019 · 3 comments
Closed
2 tasks

dubbo zookeeper registry too slow #4828

qixiaobo opened this issue Aug 14, 2019 · 3 comments
Milestone

Comments

@qixiaobo
Copy link
Contributor

  • I have searched the issues of this repository and believe that this is not a duplicate.
  • I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: 2.6.x
  • Operating System version: *nix
  • Java version: 1.7

Steps to reproduce this issue

  1. xxx
  2. xxx
  3. xxx

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

What do you expected from the above steps?

Actual Result

image

What actually happens?

We can see code like this

   @Override
    public void create(String path, boolean ephemeral) {
        if (!ephemeral) {
            if (checkExists(path)) {
                return;
            }
        }
        int i = path.lastIndexOf('/');
        if (i > 0) {
            create(path.substring(0, i), false);
        }
        if (ephemeral) {
            createEphemeral(path);
        } else {
            createPersistent(path);
        }
    }

You can see recursive here.
If we have a lot of dubbo reference or service.
This method would execute too many times and cost a large time.
In fact , if dubbo group is same then the path may no need to check every time

@qixiaobo
Copy link
Contributor Author

image

@qixiaobo
Copy link
Contributor Author

2019-08-15 14:17:54,187 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@653] - Got user-level KeeperException when processing sessionid:0x1004228f12d5154 type:create cxid:0x495 zxid:0x7c8c87 txntype:-1 reqpath:n/a Error Path:/f6-test/XXX/providers Error:KeeperErrorCode = NodeExists for /f6-test/XXX/providers

@qixiaobo
Copy link
Contributor Author

tail -n 10000 zookeeper.out |grep NodeExists|wc -l
9732
We can see almost 97% NodeExistsException

@beiwei30 beiwei30 added this to the 2.7.4 milestone Aug 22, 2019
qixiaobo added a commit to qixiaobo/dubbo that referenced this issue Aug 26, 2019
qixiaobo added a commit to qixiaobo/dubbo that referenced this issue Aug 26, 2019
@beiwei30 beiwei30 closed this as completed Sep 5, 2019
qixiaobo added a commit to qixiaobo/dubbo that referenced this issue Sep 9, 2019
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

2 participants