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

Consecutive queries on a transaction causes StartTs mismatch #14

Closed
d0nutptr opened this issue Feb 13, 2020 · 3 comments
Closed

Consecutive queries on a transaction causes StartTs mismatch #14

d0nutptr opened this issue Feb 13, 2020 · 3 comments

Comments

@d0nutptr
Copy link

d0nutptr commented Feb 13, 2020

When using a Txn to perform two queries in a row, dgraph errors out with a message stating StartTs mismatch.

You should be able to get that behavior if you do the following:

let mut txn = client.txn();

// Should work okay!
match txn.query("q(func: uid(0x01)) { uid }".to_string()) {
    Ok(result) => {},
    Err(e) => println!(e)
}

// StartTs mismatch (Err!)
match txn.query("q(func: uid(0x01)) { uid }".to_string()) {
    Ok(result) => {},
    Err(e) => println!(e)
}

Thanks for making this library!

@d0nutptr
Copy link
Author

I don't really understand what's happening to cause this, but I've temporarily removed the start_ts check in merge_context in txn.rs and this issue has gone away. Of course, I can't help but think that this is A Really Bad Idea (tm).

@ondrowan
Copy link
Collaborator

ondrowan commented Mar 1, 2020

Thanks for reporting this. I've fixed the issue in version 0.3.1. Could you, please, try if it fixed your problem?

@d0nutptr
Copy link
Author

Hey @ondrowan so sorry about this long delay.

It does appear that the issue has been fixed. Unfortunately, the current version of grpc used appears to have some issues around an invalid pointer in a free invocation.

That being said, this particular issue has been solved as far as I'm concerned.

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

No branches or pull requests

2 participants