-
Notifications
You must be signed in to change notification settings - Fork 69
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
go-dqlite doesn't support nested or interleaved Query #291
Comments
It should be possible to tweak the wire protocol (and/or its implementation) to accommodate this use case, and do it in a backward-compatible way. However, may I ask what is the real-world situation where the above pattern is desired? Normally it's much more efficient to avoid this
So while it's true that this can't currently be done in dqlite, I tend to think that in most cases (if not all) this pattern leads to less-than-optimal data access. |
Tend to agree too. In the past when we've hit this issue in LXD its been down to a bug or accidental nested transaction rather than a desirable scenario. |
Sorry, just circling back to this now. When this was brought up on MM the person reporting it noted that yes, this can and probably should be done with a join, but also that the mattn/go-sqlite3 driver does support this kind of interleaving. So probably the best thing to do here is to find a place to document that go-dqlite doesn't support this. Eventually we will start tagging requests and responses in the wire protocol with unique IDs (since there are other good reasons to do this) and I think that should also unlock support for this feature, but it doesn't seem like supporting said feature is a compelling reason to increase priority for that task. |
@cole-miller I would agree this is a low priority. The statement has been reworked to no longer do this. |
@ycliuhw pointed out (MM) that go-dqlite can't handle running a query on a
Tx
while in the middle of iterating over the rows from a previous query on the sameTx
, thus:I think this is ultimately due to limitations in the wire protocol but need to think through it a bit more.
The text was updated successfully, but these errors were encountered: