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

[1/n] Move my node ID to metadata and metadata-manager related fixes #1240

Closed
wants to merge 1 commit into from

Conversation

AhmedSoliman
Copy link
Contributor

@AhmedSoliman AhmedSoliman commented Feb 28, 2024

[1/n] Move my node ID to metadata and metadata-manager related fixes

Removes NodeId::my_node_id() and introduces metadata().my_node_id(). Along with various fixes to allow automatic propagation of metadata between tasks


Stack created with Sapling. Best reviewed with ReviewStack.

Copy link

github-actions bot commented Feb 28, 2024

Test Results

117 files  ±0  117 suites  ±0   10m 51s ⏱️ +29s
102 tests ±0  102 ✅ ±0  0 💤 ±0  0 ❌ ±0 
261 runs  ±0  261 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit b57aae4. ± Comparison against base commit bb2a82a.

♻️ This comment has been updated with latest results.

@AhmedSoliman AhmedSoliman changed the title Move my node ID to metadata and metadata-manager related fixes [1/n] Move my node ID to metadata and metadata-manager related fixes Feb 28, 2024
@AhmedSoliman AhmedSoliman marked this pull request as ready for review February 28, 2024 16:27
Removes `NodeId::my_node_id()` and introduces `metadata().my_node_id()`. Along with various fixes to allow automatic propagation of metadata between tasks
Copy link
Contributor

@tillrohrmann tillrohrmann left a comment

Choose a reason for hiding this comment

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

Really good work @AhmedSoliman. The changes look good to me. +1 for merging.

@@ -132,6 +142,11 @@ impl MetadataWriter {
}
}

/// Should be called once on node startup. Updates are ignored after the initial value is set.
pub fn set_my_node_id(&self, id: GenerationalNodeId) {
let _ = self.inner.my_node_id.set(id);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add an expect to catch accidental misuses?

@AhmedSoliman
Copy link
Contributor Author

Manually merged.

@AhmedSoliman AhmedSoliman deleted the pr1240 branch April 30, 2024 13:06
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