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

Improve replica revision counter #1097

Merged
merged 4 commits into from
May 31, 2024
Merged

Improve replica revision counter #1097

merged 4 commits into from
May 31, 2024

Conversation

shuo-wu
Copy link
Contributor

@shuo-wu shuo-wu commented May 3, 2024

Which issue(s) this PR fixes:

longhorn/longhorn#8436

What this PR does / why we need it:

  1. Remove unused replica HTTP service
  2. Replace revision counter mutex lock with a go channel
  3. Use a separate goroutine to increase the revision counter during write

Special notes for your reviewer:

Additional documentation or context

This PR implements idea 4 and 5 mentioned in this comment

Copy link
Contributor

@ejweber ejweber left a comment

Choose a reason for hiding this comment

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

LGTM in principle. One significant suggestion, one nit, and one request for clarification.

pkg/replica/revision_counter.go Outdated Show resolved Hide resolved
app/cmd/replica.go Outdated Show resolved Hide resolved
pkg/replica/revision_counter.go Outdated Show resolved Hide resolved
This replica HTTP service was used when the replica gRPC service had not been
introduced. Now we neither rely on it for the engine-replica communication, nor
use it for debugging. There is no need to retain these code.

Signed-off-by: Shuo Wu <[email protected]>
Copy link
Contributor

@ejweber ejweber left a comment

Choose a reason for hiding this comment

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

The changes LGTM. Thanks!

Copy link
Contributor

@PhanLe1010 PhanLe1010 left a comment

Choose a reason for hiding this comment

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

LGTM in gerneral. Quick question: we are removing the /pkg/replica/rest, are we no longer need it in any testing tool?

@mergify mergify bot merged commit 2319858 into longhorn:master May 31, 2024
10 of 11 checks passed
@shuo-wu
Copy link
Contributor Author

shuo-wu commented May 31, 2024

Quick question: we are removing the /pkg/replica/rest, are we no longer need it in any testing tool?

No, we don't need it anymore.

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.

3 participants