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

metadata() for global metadata access #1214

Merged
merged 4 commits into from
Feb 23, 2024
Merged

metadata() for global metadata access #1214

merged 4 commits into from
Feb 23, 2024

Conversation

AhmedSoliman
Copy link
Contributor

@AhmedSoliman AhmedSoliman commented Feb 22, 2024

metadata() for global metadata access

Access to metadata has never been easier. Access metadata() by importing restate_core::metadata;


Stack created with Sapling. Best reviewed with ReviewStack.

node-services protocol is meant for internal restate communication. pb/ appears to go beyond the internal cluster scope.
We need to consolidate a few bits of the system into a core crate to avoid the unnecessary dependency management hassle.

The end goal is to consolidate many of the shared components into this crate. At the moment, task-center and metadata appear to be the best candidate since they are used from everywhere.
Copy link

github-actions bot commented Feb 22, 2024

Test Results

111 files  ±0  111 suites  ±0   11m 2s ⏱️ +26s
100 tests ±0  100 ✅ ±0  0 💤 ±0  0 ❌ ±0 
255 runs  ±0  255 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit f4bb181. ± Comparison against base commit ba7a9a4.

♻️ This comment has been updated with latest results.

as described in the previous PR in the stack
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.

Nice work :-) LGTM. +1 for merging.

@@ -133,6 +133,8 @@ impl Node {
let tc = task_center();
let metadata_writer = self.metadata_manager.writer();
let metadata = self.metadata_manager.metadata();
let is_set = tc.try_set_global_metadata(metadata.clone());
debug_assert!(is_set);
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add a short error message for easier debugging.

Access to metadata has never been easier. Access `metadata()` by importing `restate_core::metadata`;
@AhmedSoliman AhmedSoliman merged commit a2002ad into main Feb 23, 2024
8 checks passed
@AhmedSoliman AhmedSoliman deleted the pr1214 branch February 23, 2024 11:01
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.

None yet

2 participants