[PR #956] [MERGED] Reduce the peer status notifications #14610

Closed
opened 2026-08-05 03:05:58 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/956
Author: @pappz
Created: 6/15/2023
Status: Merged
Merged: 6/19/2023
Merged by: @pappz

Base: mainHead: fix/overloaded_status_notification


📝 Commits (3)

📊 Changes

3 files changed (+41 additions, -17 deletions)

View changed files

📝 client/internal/engine.go (+4 -5)
📝 client/internal/peer/status.go (+34 -9)
📝 client/internal/peer/status_test.go (+3 -3)

📄 Description

Reduce the peer status notifications

Describe your changes

When receive new network map invoked multiple notifications for
every single peers. It cause high cpu usage We handle the in a batch
the peer notification in update network map.

  • Remove the unnecessary UpdatePeerFQDN calls in addNewPeer
  • Fix notification in RemovePeer function
  • Involve FinishPeerListModifications logic

NB-284

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

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/956 **Author:** [@pappz](https://github.com/pappz) **Created:** 6/15/2023 **Status:** ✅ Merged **Merged:** 6/19/2023 **Merged by:** [@pappz](https://github.com/pappz) **Base:** `main` ← **Head:** `fix/overloaded_status_notification` --- ### 📝 Commits (3) - [`ad6716f`](https://github.com/netbirdio/netbird/commit/ad6716f2be516fd9e21e0bc083b345b05a71e28b) Reduce the peer status notifications - [`d695c68`](https://github.com/netbirdio/netbird/commit/d695c6886f27d26ed25c05c90923f9e6fb20a388) Fix test - [`b591ea9`](https://github.com/netbirdio/netbird/commit/b591ea939fb85981e747aaf4b1bf7e6a59e515cd) Fix lint ### 📊 Changes **3 files changed** (+41 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `client/internal/engine.go` (+4 -5) 📝 `client/internal/peer/status.go` (+34 -9) 📝 `client/internal/peer/status_test.go` (+3 -3) </details> ### 📄 Description Reduce the peer status notifications ## Describe your changes When receive new network map invoked multiple notifications for every single peers. It cause high cpu usage We handle the in a batch the peer notification in update network map. - Remove the unnecessary **UpdatePeerFQDN** calls in **addNewPeer** - Fix notification in **RemovePeer** function - Involve **FinishPeerListModifications** logic ## Issue ticket number and link NB-284 ### Checklist - [x] 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 03:05:58 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#14610