-
Notifications
You must be signed in to change notification settings - Fork 122
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
Stopped instance should return a meaningful error message [was: Error when trying to delete a relation]. #1154
Comments
This error means that the worker thread has crashed, so it's likely a bug. Do you see anything else on the stderr from the worker thread by any chance? Is there a way I could reproduce the error? |
I can't seem to see any other information with regards to the error. The error should be reproducible with the following use differential_datalog::api::HDDlog;
use differential_datalog::ddval::{DDValConvert, DDValue};
use differential_datalog::program::{RelId, Update};
use differential_datalog::{DDlog, DDlogDynamic, DeltaMap};
use type_checker1_ddlog::typedefs::*;
use type_checker1_ddlog::Relations;
fn main() {
let (hddlog, _) = type_checker1_ddlog::run(1, false).unwrap();
// Insertion transaction:
hddlog.transaction_start().unwrap();
let updates = vec![
Update::Insert {
relid: Relations::Main as RelId,
v: Main { id: 0, body_id: 1 }.into_ddvalue(),
},
Update::Insert {
relid: Relations::Unit as RelId,
v: Unit { id: 1 }.into_ddvalue(),
},
];
hddlog.apply_updates(&mut updates.into_iter()).unwrap();
let mut delta = hddlog.transaction_commit_dump_changes().unwrap();
println!("State after insertion transaction:");
dump_delta(&delta);
hddlog.stop().unwrap();
// Deletion transaction:
hddlog.transaction_start().unwrap();
let delete_updates = vec![Update::DeleteValue {
relid: Relations::Main as RelId,
v: Main { id: 0, body_id: 1 }.into_ddvalue(),
}];
hddlog
.apply_updates(&mut delete_updates.into_iter())
.unwrap();
delta = hddlog.transaction_commit_dump_changes().unwrap();
println!("State after deletion transaction:");
dump_delta(&delta);
hddlog.stop().unwrap();
}
fn dump_delta(delta: &DeltaMap<DDValue>) {
for (_, changes) in delta.iter() {
for (val, weight) in changes.iter() {
println!("{} {:+}", val, weight);
}
}
} With the following
|
I suspect, the problem is caused by this line, which kills the DDlog instance after the first transaction:
This is not something you want to do in the middle of a session. |
Oh I see - I assumed this would end the transaction, not the kill the whole instance, but this is indeed the problem. Thank you! |
I don't remember why |
I'm using the Rust API to interact with a DDlog program and I keep getting the following error when I try to delete any relation at runtime (using just
hddlog.apply_updates(&mut delete_updates.into_iter()).unwrap();
wheredelete_updates
has updates of typeUpdate::DeleteValue
):I am certain that the relation I want to delete is inserted beforehand (and I also don't have any problems with the initial insertions). Any thoughts as to what issues might be causing the
failed to communicate with timely dataflow thread 0
error (which seems very unspecific), or how I could go about debugging to find the issue given I don't know much about timely dataflow?The text was updated successfully, but these errors were encountered: