-
Notifications
You must be signed in to change notification settings - Fork 78
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
fix: Fix errors on transaction status #464
Conversation
Thanks, good catch. I wonder if we should rather fail issues downstream and release nevertheless. Calling |
I can conceive some reasonable use cases using Thinking out loud, maybe a this point replacing the error by a message/warning is a compromise solution and lends them some time to make the necessary changes. |
A warning sounds about right to me. Thanks! |
This sounded quite weird for me, and I decided to take a deeper look at their code. Let me think a bit more about this to try to find an alternative implementation. |
So, I just completely reworked this. Now we're asking for the transaction status directly to the backend instead of trying to maintain a counter of open transactions. It is much more simple and should also be way more robust. |
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.
Thanks. I wonder if we should test for autocommit mode instead:
As far as I can see this has the major advantage of not delaying flagging a transaction until a read/write is attempted. Let me take a look at the code, it should not be hard to change the logic to look for autocomnit=off instead of transaction=on. |
b475cf1
to
ccf4027
Compare
A transaction is not reported until some I/O is actually attempted after dbBegin (or equivalent command).
Delayed flagging of transaction starting is no longer to be expected.
ccf4027
to
36072e0
Compare
I sent RSQLite 2.3.2 to CRAN, without the new functions. Took me four months to come up with that path of action... Anyway, once released, we can figure out what to do here, and submit an update. |
Hello. I'm really sorry and sad the initial implementation didn't quite work as intended and the additional workload it might have caused to you. Please let me know if there is something I can do about it. |
Thanks, no worries. I like the new approach. We can release the update on November 4, the advantage is that we have a CRAN version with SQLite 3.43. I'll run revdepchecks just to be sure. |
Some packages dependant on RSQLite are applying commit/rollback when no open transactions exist. Raising this error seems to be breaking some of them.