Skip to content

bugfix: use etcd:watchcancel to reduce connections in etcdv3#2299

Merged
moonming merged 14 commits intoapache:masterfrom
Yiyiyimu:watchcancel
Sep 28, 2020
Merged

bugfix: use etcd:watchcancel to reduce connections in etcdv3#2299
moonming merged 14 commits intoapache:masterfrom
Yiyiyimu:watchcancel

Conversation

@Yiyiyimu
Copy link
Member

What this PR does / why we need it:

fix #2295

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible?

@Yiyiyimu Yiyiyimu marked this pull request as draft September 24, 2020 04:54
@moonming moonming added this to the 2.0 milestone Sep 24, 2020
@nic-chen nic-chen marked this pull request as ready for review September 26, 2020 00:48
@nic-chen nic-chen changed the title [WIP] fix: use etcd:watchcancel to reduce connections in etcdv3 bugfix: use etcd:watchcancel to reduce connections in etcdv3 Sep 26, 2020
Comment on lines -184 to -187
if not dir_res.dir then
return false, self.key .. " is not a dir"
end

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently I still set dir = true in etcd protocol conversion for consistency between protocols. But I noticed there is only one test case (global.t TEST 3) needs this parameter, so maybe we could remove it

Signed-off-by: yiyiyimu <wosoyoung@gmail.com>
…create new client

Signed-off-by: yiyiyimu <wosoyoung@gmail.com>
Signed-off-by: yiyiyimu <wosoyoung@gmail.com>
@Yiyiyimu
Copy link
Member Author

Hi @membphis is there something else we should do before merging

@Yiyiyimu
Copy link
Member Author

ping @moonming it seems good to go

Copy link
Contributor

@idbeta idbeta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I passed in my local environment

@membphis membphis requested a review from nic-chen September 28, 2020 09:56
Copy link
Member

@membphis membphis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code style

@moonming moonming merged commit e0ee327 into apache:master Sep 28, 2020
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

Successfully merging this pull request may close these issues.

request help: Too many connections when using etcdv3

6 participants