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

Current refresh interval is too high #6357

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

dkrotx
Copy link
Member

@dkrotx dkrotx commented Oct 11, 2024

There is no need to keep it is 10 seconds as we are requesting internal
state of ringpop/uns any way.

Decreased refresh intervla

Having them 2 seconds for throttle and 10s for full refresh is too much as we deal with just 3-4 of them in every cadence process.

How did you test it?

Potential risks

Release notes

Documentation Changes

There is no need to keep it is 10 seconds as we are requesting internal
state of ringpop/uns any way.
@Groxx
Copy link
Member

Groxx commented Oct 11, 2024

I think even with "real" ringpop it's just looking at in-memory state, so superficially at least yea this seems fine. checking is a small bit of CPU and nothing else afaik.

it's a bigger change than this PR needs, but: maybe it'd be worth just doing all of this every second? no debouncing, no notifying of changes, just a constant re-checking?
the only real risk I can see is if the changes come in faster than the change-processors can keep up with, which seems like it could mean they miss a change notification since that notify-send is iirc a non-blocking chan send.

... which is probably true right now, so both that and this change would probably just risk increasing the frequency. any idea how bad that might be?

@Groxx Groxx disabled auto-merge October 11, 2024 18:18
Copy link
Member

@Groxx Groxx left a comment

Choose a reason for hiding this comment

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

pausing automerge for a question. but if that doesn't seem like a problem, this LGTM 👍

Copy link

codecov bot commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.92%. Comparing base (77c61f2) to head (6b1838f).
Report is 2 commits behind head on master.

Additional details and impacted files
Files with missing lines Coverage Δ
common/membership/hashring.go 90.95% <ø> (ø)

... and 6 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 77c61f2...6b1838f. Read the comment docs.

@Groxx
Copy link
Member

Groxx commented Oct 11, 2024

ah, Subscribe takes a channel, it doesn't create one. So subscribers can choose their buffer, and choose how to handle changes that occur while they're processing a change.

yep, then it seems fine to increase the rate.

@dkrotx dkrotx merged commit 4113d63 into cadence-workflow:master Oct 11, 2024
20 checks passed
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.

2 participants