Browser:
Server: WTAF are you trying to do, here, man?
Message: Hi everybody!
21–30 of 278 posts
Browser:
Server: WTAF are you trying to do, here, man?
Message: Hi everybody!
I've had similar philosophical thoughts about a transaction rollback. Consider this definition from go's database/sql package. func (tx *Tx) Rollback() error Rollback can fail, indicated as such by it can return an error. What are the cases where rollback could fail and what's the recovery mechanism? Does a failed rollback mean (logically) that the transaction is still open and uncommitted? But really, invoking rollb…
The commentary is golden. Trying to guess what is going on. I guess they refer to the original message (on the server) and its local copy. Both referred to as "the message".
Earlier quoted context omitted.
What if it's a connection problem? DBs are normally remote. It's also OK to specify potential bug surface on your API.
The bug being referred to isn't the connection problem, the bug is that in the event of a loss of communication with the client, the transaction isn't fully cleaned up, including the release of held locks, when the transaction enters an abortive state.
I've had similar philosophical thoughts about a transaction rollback. Consider this definition from go's database/sql package. func (tx *Tx) Rollback() error Rollback can fail, indicated as such by it can return an error. What are the cases where rollback could fail and what's the recovery mechanism? Does a failed rollback mean (logically) that the transaction is still open and uncommitted? But really, invoking rollb…
Rolling back a transaction twice probably indicates an error in your program, which Go's API is giving you a chance to report to yourself.
Ultimately every network request can fail because of the Two Generals' Problem. Actually, every single operation on a computer can fail (as in, do something other than what you were promised or promised yourself it would do). Nothing in life is guaranteed, the environment is adversarial. The fact that we create machines that can be predicted with 0.00000000001% certainty and carve out a safe environment for them and feed them energy is not common and unnatural and all computers will also eventually succumb to entropy. The network is just where that is common enough that considering that another computer can die in our programs can be more useful than completely ignoring the possibility. This possibility is represented as a non-zero number called "error" in the Go API you've posted, so that you have the option of branching your program to a different execution path if the database you're communicating with stops existing or at least stops being reachable.
It has ceased to be
The commentary is golden. Trying to guess what is going on. I guess they refer to the original message (on the server) and its local copy. Both referred to as "the message".