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

Add pre-built list of neighborhood Targets to each node #118

Merged
merged 5 commits into from
Feb 10, 2021

Conversation

ChristopherHogan
Copy link
Collaborator

Closes #76.

  • Adds a list of neighborhood Targets to each node that consists of the local Targets from node_id - 1 and node_id + 1 (wrapping around). This is a temporary definition of a neighborhood. In the future a TopologyManager will decide how neighborhoods are built.
  • The main interface is LocalGetNeighborhoodTargets. Unfortunately we can't create automated tests for it until we resolve Automated cluster testing #116.

@coveralls
Copy link

coveralls commented Feb 5, 2021

Pull Request Test Coverage Report for Build 552682360

  • 45 of 73 (61.64%) changed or added relevant lines in 5 files are covered.
  • 6 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.2%) to 80.402%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/rpc_thallium.cc 3 6 50.0%
src/metadata_storage_stb_ds.cc 18 23 78.26%
src/metadata_management.cc 21 41 51.22%
Files with Coverage Reduction New Missed Lines %
src/api/hermes.cc 1 88.24%
src/data_placement_engine.cc 1 95.73%
src/api/bucket.cc 4 93.27%
Totals Coverage Status
Change from base Build 541346601: 0.2%
Covered Lines: 4841
Relevant Lines: 6021

💛 - Coveralls

@@ -975,4 +975,80 @@ void DecrementRefcount(SharedMemoryContext *context, RpcContext *rpc,
}
}

u32 GetRelativeNodeId(RpcContext *rpc, int offset) {
int result = rpc->node_id + offset;
CHECK_GE(result, 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it fine to abort here if check failed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I believe so. Since this is an internal developer interface, the check is here to prevent developer errors. In that case, I prefer to fail as fast as possible. Maybe an assert would be better since it's intended as a developer check.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I changed it to assert.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks!

@ChristopherHogan ChristopherHogan merged commit c9afa31 into master Feb 10, 2021
@ChristopherHogan ChristopherHogan deleted the chogan/neighborhoods branch February 10, 2021 14:18
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.

Automated cluster testing Implement pre-built Target lists
3 participants