Closed
Description
Below (in a separate comment) is a modified delta_query.rs
that
- uses a fixed number of workers (32)
- does not read the graph from files, but instead inserts six hard-coded edges, so that the resulting graph should have two triangles (<1,2,3> and <3,4,1>). All inserts are done from thread 0.
- IMPORTANT (this is what triggers the bug): after each insert, propagates changes through the pipeline:
input.insert(v.clone());
input.advance_to(i+1);
input.flush();
while probe.less_than(&(i+1)) {
worker.step();
}
- workers other than 0 simply step until reaching the last timestamp:
input.advance_to(6);
input.flush();
while probe.less_than(&6) {
worker.step();
}
when I run the modified example cargo run --example delta_query
, the program randomly computes 0, 1, or 2 triangles:
# 0 triangles
$cargo run --example delta_query
Finished dev [unoptimized + debuginfo] target(s) in 0.05s
Running `/home/lryzhyk/projects/differential-dataflow/dogsdogsdogs/target/debug/examples/delta_query
worker0 at timestamp 1
worker0 at timestamp 2
worker0 at timestamp 3
worker0 at timestamp 4
worker0 at timestamp 5
worker0 at timestamp 6
# 1 triangle
$ cargo run --example delta_query
Finished dev [unoptimized + debuginfo] target(s) in 0.05s
Running `/home/lryzhyk/projects/differential-dataflow/dogsdogsdogs/target/debug/examples/delta_query`
worker0 at timestamp 1
worker0 at timestamp 2
worker0 at timestamp 3
worker0 at timestamp 4
worker0 at timestamp 5
Triangle: ((3, 4, 1), 5, 1)
worker0 at timestamp 6
If instead of looping on worker.step()
after each insert I first insert all values (while advancing input timestamp) and then do
while probe.less_than(&6) {
worker.step();
}
then it computes two triangles as expected.
Am I using the API incorrectly or is this behavior indeed problematic?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels