Skip to content

Dev/node to site#30

Merged
ieQu1 merged 4 commits into
masterfrom
dev/node-to-site
Jul 11, 2026
Merged

Dev/node to site#30
ieQu1 merged 4 commits into
masterfrom
dev/node-to-site

Conversation

@ieQu1

@ieQu1 ieQu1 commented Jul 11, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

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 introduces a new public API to retrieve a node→site mapping, adds an ETS select/2 helper that waits for table restoration, and extends the test suite to validate the new behavior across cluster lifecycle events.

Changes:

  • Add classy:node_to_site/0 API and internal implementation in classy_node.
  • Add classy_table:select/2 wrapper and migrate membership ETS selects to use it.
  • Extend t_091_node_of_site to validate node_to_site/0 in singleton, clustered, and disconnected-peer scenarios.

Reviewed changes

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

Show a summary per file
File Description
test/classy_SUITE.erl Adds assertions covering classy:node_to_site/0 behavior before/after join and after peer shutdown.
src/classy.erl Exposes node_to_site/0 as a public API with cluster-membership gating.
src/classy_table.erl Adds select/2 helper mirroring lookup/2’s “wait until restored” behavior.
src/classy_node.erl Implements node_to_site/0 via a match-spec select over ?site_info.
src/classy_membership.erl Replaces direct ets:select/2 with classy_table:select/2 for safety during restoration.

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

Comment thread src/classy_node.erl

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Comment thread src/classy_table.erl
Comment on lines +412 to +414
-doc """
Run @code{ets:select} on the table after making sure it's open.
""".
Comment thread src/classy.erl Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Comment thread src/classy_table.erl
Comment thread src/classy.erl Outdated
Comment on lines +132 to +134
Kick intent is an arbitrary term passed to @ref{classy:pre_kick/2} @ref{classy:on_kick_decided/2} and @ref{classy:post_leave/2} hooks.
@code{pre_kick} may match on intent to prevent node from leaving the cluster in certain cases,
while to @code{post_kick} this value is merely informational.
while to @code{post_leave} this value is merely informational.
@ieQu1 ieQu1 force-pushed the dev/node-to-site branch from fcf5165 to 0a9f3e5 Compare July 11, 2026 16:36
@ieQu1 ieQu1 merged commit edf1b34 into master Jul 11, 2026
4 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