-
Notifications
You must be signed in to change notification settings - Fork 242
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
Persistent log #10
Persistent log #10
Changes from 56 commits
f5aebf0
9dfeef4
899255b
8e145d9
63df9d5
90e34cd
7dc6059
989b3ed
7f53514
7d54e7a
bcd716c
595c108
20ebe28
1dac639
0b9ca62
ef4ad8e
ed5e44f
f7ccf34
0e86c5f
f329d2c
495f26c
7fff86c
015fb1a
71aace5
d206961
63d8264
0af6305
e341076
6c96dd0
40fe135
08f18c4
dab2110
fc3067d
dbeed9e
aeb9b25
1f97159
98b4c16
113ef03
c9472d4
348fb38
c928130
5b0cead
7c5b204
6e6e2c6
4c69bc6
1726fe6
d379789
556ea74
f73884a
71c99fd
53810ef
e6f97e0
f27031b
0e5e49d
fdef1ef
a8bce37
53661ea
7131374
5c74fdf
ae90dc4
0a0a48d
fcb06ae
9391c56
40655f2
191568e
c7c2fd3
ab6db4c
5914147
8d08399
94c5c20
6c36373
8f06306
574ac31
3e7fd41
fcd59a6
9e70207
aa12b55
eda1d3c
18ec1aa
36c449a
9a65e04
921302e
3f41330
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,7 +84,7 @@ pub trait Ingredient | |
data: prelude::Records, | ||
domain: &prelude::DomainNodes, | ||
states: &prelude::StateMap) | ||
-> prelude::Records; | ||
-> Option<prelude::Records>; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agh, that's going to be annoying to incorporate into |
||
|
||
fn can_query_through(&self) -> bool { | ||
false | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -161,7 +161,7 @@ impl NodeDescriptor { | |
} | ||
flow::node::Type::Internal(ref mut i) => { | ||
let from = m.link().src; | ||
m.map_data(|data| i.on_input(from, data, nodes, state)); | ||
m.map_data(|data| i.on_input(from, data, nodes, state).unwrap()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Base::on_input is returning Option now, hence the unwrap(). Should we have a match here instead? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, if never returns There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolved |
||
materialize(m.data(), state.get_mut(&addr)); | ||
m | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -463,7 +463,7 @@ impl<'a> Migration<'a> { | |
self.mainline.ingredients.add_edge(*parent.as_global(), ni, false); | ||
} | ||
} | ||
// and tell the caller its id | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reverted |
||
ni.into() | ||
} | ||
|
||
|
@@ -889,18 +889,13 @@ impl<'a> Migration<'a> { | |
|
||
impl Drop for Blender { | ||
fn drop(&mut self) { | ||
//println!("Blender started dropping."); | ||
|
||
for (_, tx) in &mut self.txs { | ||
// don't unwrap, because given domain may already have terminated | ||
drop(tx.send(payload::Packet::Quit)); | ||
} | ||
for d in self.domains.drain(..) { | ||
//println!("Waiting for domain thread to join."); | ||
d.join().unwrap(); | ||
} | ||
|
||
//println!("Blender is done dropping.") | ||
} | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,6 +74,9 @@ pub enum Packet { | |
parents: Vec<LocalNodeIndex>, | ||
}, | ||
|
||
/// Instruct base nodes to flush any buffered writes. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we cut this entirely for now? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
//FlushBufferedWrites, | ||
|
||
/// Set up a fresh, empty state for a node, indexed by a particular column. | ||
/// | ||
/// This is done in preparation of a subsequent state replay. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -175,7 +175,8 @@ | |
//! # let mut g = Blender::new(); | ||
//! # let article = { | ||
//! # let mut mig = g.start_migration(); | ||
//! # let article = mig.add_ingredient("article", &["id", "title"], Base::default()); | ||
//! # let article = mig.add_ingredient("article", &["id", "title"], | ||
//! # Base::default()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reverted |
||
//! # mig.commit(); | ||
//! # article | ||
//! # }; | ||
|
@@ -356,6 +357,11 @@ extern crate futures; | |
#[cfg(feature="b_netsoup")] | ||
extern crate tokio_core; | ||
|
||
extern crate buf_redux; | ||
extern crate serde_json; | ||
extern crate snowflake; | ||
extern crate time; | ||
|
||
mod backlog; | ||
mod checktable; | ||
mod flow; | ||
|
@@ -369,7 +375,7 @@ pub use flow::{Blender, Migration, Mutator}; | |
pub use flow::core::{NodeAddress, DataType, Datas}; | ||
pub use flow::node::StreamUpdate; | ||
pub use flow::domain::Index; | ||
pub use ops::base::Base; | ||
pub use ops::base::{Base, BaseDurabilityLevel}; | ||
pub use ops::grouped::aggregate::{Aggregator, Aggregation}; | ||
pub use ops::grouped::concat::{GroupConcat, TextComponent}; | ||
pub use ops::grouped::extremum::{Extremum, ExtremumOperator}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point you can probably just make
serde
andserde_derive
be non-optional dependencies, and then not list them underdefault
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done