Skip to content

[Management] replace update channel with buffer #4043

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

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

pascal-fischer
Copy link
Collaborator

Describe your changes

Issue ticket number and link

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

@Copilot Copilot AI review requested due to automatic review settings June 24, 2025 22:02
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the update channel mechanism by replacing it with a custom update buffer, and it also adds additional network serial number increments in various parts of the codebase. Key changes include:

  • Replacing the channel-based update mechanism with an UpdateBuffer.
  • Reducing the buffer size constant in updatechannel.go.
  • Adding calls to IncrementNetworkSerial in several functions to ensure peers receive updated network information.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
management/server/user.go Added IncrementNetworkSerial call to update network changes.
management/server/updatechannel.go Replaced chan-based channels with UpdateBuffer usage.
management/server/update_buffer.go Introduced UpdateBuffer for buffering updates.
management/server/peer.go Added IncrementNetworkSerial calls during peer events.
management/server/grpcserver.go Updated Sync and handleUpdates to work with the UpdateBuffer.
management/server/account.go Added IncrementNetworkSerial call in onPeersInvalidated hook.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 New issue
1 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

1 participant