Skip to content

atomic peer.peerInfo by using atomic.Pointer[table.PeerInfo]#3306

Closed
nplanelcisco wants to merge 1 commit intoosrg:masterfrom
nplanelcisco:nplanel/atomic-peerinfo
Closed

atomic peer.peerInfo by using atomic.Pointer[table.PeerInfo]#3306
nplanelcisco wants to merge 1 commit intoosrg:masterfrom
nplanelcisco:nplanel/atomic-peerinfo

Conversation

@nplanelcisco
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

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 pull request updates the peer.peerInfo field to be concurrency-safe by switching it to atomic.Pointer[table.PeerInfo], and updates call sites (including tests) to use Load()/Store() accordingly.

Changes:

  • Change peer.peerInfo from *table.PeerInfo to atomic.Pointer[table.PeerInfo].
  • Update server runtime code to use peer.peerInfo.Load() / peer.peerInfo.Store(...).
  • Update unit tests to use Load() / Store() when constructing paths and peers.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
pkg/server/peer.go Changes peer.peerInfo to atomic.Pointer and updates message processing to pass peer.peerInfo.Load() into table APIs.
pkg/server/server.go Replaces direct pointer usage with atomic Load()/Store() for policy options, path attribute updates, and watcher events.
pkg/server/server_test.go Updates test helpers and path construction to use peer.peerInfo.Store(...) and peer.peerInfo.Load().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fujita
Copy link
Copy Markdown
Member

fujita commented Feb 12, 2026

Pushed, thanks! Sorry for the delay.

@fujita fujita closed this Feb 12, 2026
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