Skip to content

Static reader node replication#113

Open
ygina wants to merge 46 commits intomasterfrom
replication
Open

Static reader node replication#113
ygina wants to merge 46 commits intomasterfrom
replication

Conversation

@ygina
Copy link
Copy Markdown
Member

@ygina ygina commented Nov 2, 2018

Place replicas in separate domains, including when there is only 1 replica. Place these domains round robin on separate workers. (migrate/mod.rs)
Support for removing all reader replicas along with a view. (controller/inner.rs)
Obtain views to replicas round robin. CLI options to set replicas and reader threads.

Benchmarks: 16 client threads and cores, 4 Noria servers with 1 core per server, 1 write every 100 on the vote benchmark. As number of replicas increases, Noria can handle a greater number of ops/s before falling behind.
Tests: Same as before, with updated node counts to account for additional replicas. One new test to check that view actually returns different replicas, and that writes are reflected in these replicas.

@ygina
Copy link
Copy Markdown
Member Author

ygina commented Nov 11, 2018

Going to simplify commit() and clarify the language surrounding replicas to address the remaining comments. It seems like sharding followed the convention where None meant 1 shard. For replication, i think it makes sense to think of the replication parameter as the "replication factor" rather than the number of replicas in addition to the original reader --> so replication factor of 1 = 1 reader.

Comment thread noria-server/dataflow/src/node/mod.rs Outdated
Comment thread noria-server/dataflow/src/node/mod.rs
Comment thread noria-server/dataflow/src/node/special/reader.rs
Comment thread noria-server/src/controller/builder.rs Outdated
Comment thread noria-server/src/controller/inner.rs Outdated
Comment thread noria-server/src/controller/inner.rs
Comment thread noria-server/src/controller/inner.rs Outdated
// Typically, we are looking for a single egress node that connects the leaf to
// readers in other domains.
// TODO: if each reader (including the 1st) definitely gets its own domain, this
// code can be a lot simpler.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How much is "a lot"? I think we should favor simplicity then.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

👍

Comment thread noria-server/src/controller/migrate/mod.rs Outdated
@jonhoo
Copy link
Copy Markdown
Contributor

jonhoo commented Nov 14, 2018

Given 232453f, I'd particularly like @fintelia to take a look at this.

@ms705
Copy link
Copy Markdown
Member

ms705 commented Jan 5, 2019

Where did we end up with this? I vaguely remember discussing the outstanding issues with @fintelia before the holidays.

@fintelia
Copy link
Copy Markdown
Member

fintelia commented Jan 8, 2019

Last I recall query removal was being corrected because it didn't properly handle deletion of non-reader nodes. I'm not sure what the current status is

@ygina
Copy link
Copy Markdown
Member Author

ygina commented Jan 8, 2019

@fintelia I don't have any more changes to make. Is there a case you're concerned about in particular? It looks like the old code removes non-reader nodes in reverse topological order before it reaches my code for removing leaf/reader nodes, so it shouldn't be affected.

Copy link
Copy Markdown
Member

@fintelia fintelia left a comment

Choose a reason for hiding this comment

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

This version looks good to me. I've suggested a couple stylistic changes, but the logic seems fine

Comment thread noria-server/src/controller/inner.rs Outdated
);
// The nodes we remove first do not have children any more
for node in &nodes {
assert_eq!(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Couldn't this check have been done when node is added to the collection?

Comment thread noria-server/src/controller/inner.rs Outdated
.next()
.unwrap();
assert!(self.ingredients[child].is_egress());
Some(child)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is the only branch that returns Some(). Why not just place the if statement from below right here instead?

Copy link
Copy Markdown

@loannaflip loannaflip left a comment

Choose a reason for hiding this comment

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

looks good!

@mit-pdos mit-pdos deleted a comment from wubx Jan 14, 2023
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.

5 participants