-
Notifications
You must be signed in to change notification settings - Fork 173
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
feat: add clutser topology awareness #638
Merged
Merged
Changes from 6 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
aba2496
feat: add clutser topology awareness
proost 1181ffb
fix: depense closed channel close
proost 027671b
refactor: make conditional refresh
proost 931eddf
test: fix broken test
proost e743162
test: change flaky test
proost b075e69
perf: use less call
proost 826de2c
refactor: rollback
proost 9fd1da9
perf: set detection logic
proost 09a9403
refactor: rename cluster option
proost fa0b58a
refactor: divide lazy conditional refresh
proost 42c0b0d
refactor: make reusable code
proost c02c256
refactor: merge refresh
proost 9f886c5
refactor: use parameter
proost 3712efd
refactor: always refresh
proost 3c97bc8
refactor: rename shardsrefreshinterval
proost File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, now there is no duplicated
getClusterTopology
at the end. However, I still want all the refresh processes, including the new conditional one, to be gated by thelazyRefresh
function to ensure at most onegetClusterTopology
per second and not to flood the servers.lazyRefresh
serves the same purpose as your initial cool-down period proposal. Can we merge the_refresh
andconditionalRefresh
and then just uselazyRefresh
here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
826de2c
just call lazyRefresh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I am ok with this one, but why do you delete your detection logic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, i thought you want to use original one. i changed 9fd1da9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fa0b58a
We should not merge
_refresh
andconditionalRefresh
._refresh
is called,There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would 1 be an issue if we made
_refresh
conditionally? I thought in that case the checking logic would be bypassed.For 2 and 3, I don't get your points of not making
_refresh
conditionally. They are not related to the refresh process but are more related to how we act on the result of it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c02c256