--
You received this message because you are subscribed to the Google Groups "CockroachDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cockroach-db...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Thursday, April 7, 2016 at 3:43:08 PM UTC-5, Radu Berinde wrote:
> > I think this is an important feature. Almost all software that performs transactions needs to be able to specify a limit for how long a thread performing such a a transaction will block.
>
> We may add this in the future. But note that in our system, there is no thread blocked because of an in-progress transaction. More importantly, our serialization is not based on locks so an in-progress transaction will not strictly block all other transactions; if there are a lot of conflicting transactions, the long running transaction will eventually fail with a retryable error.
That good to know, but I'm worried about network problems as well as conflict handling. Obviously, in order for a node to commit an ACID transaction, it will have to talk to the other nodes, and that means the potential for arbitrarily long delays unless there are some timeouts being enforced on that network communication. The client will of course inherit these delays while waiting for confirmation that the transaction committed.
In other words, what the client cares about is being able to set an upper bound on all possible sources of delay together, no matter what their source.
> > where are all the session/transaction SET variables documented?
>
> Other than the stuff that is in the grammar we don't have many variables (just SYNTAX and DATABASE as far as I can tell, code here: https://github.com/cockroachdb/cockroach/blob/master/sql/set.go#L33)
Thanks, the code is always authoritative :)
It would be nice to start a documentation page listing these variables, to document them and provide a place for new ones that will inevitably appear in the future. Obviously not a serious problem now because there's not much there yet.
-Archie
This was also requested today at the talk Marc and I gave. Wonder if session var is the best way or perhaps a cap per user, or both.
On Thursday, April 7, 2016 at 3:43:08 PM UTC-5, Radu Berinde wrote:
> > I think this is an important feature. Almost all software that performs transactions needs to be able to specify a limit for how long a thread performing such a a transaction will block.
>
> We may add this in the future. But note that in our system, there is no thread blocked because of an in-progress transaction. More importantly, our serialization is not based on locks so an in-progress transaction will not strictly block all other transactions; if there are a lot of conflicting transactions, the long running transaction will eventually fail with a retryable error.
That good to know, but I'm worried about network problems as well as conflict handling.
Obviously, in order for a node to commit an ACID transaction, it will have to talk to the other nodes, and that means the potential for arbitrarily long delays unless there are some timeouts being enforced on that network communication. The client will of course inherit these delays while waiting for confirmation that the transaction committed.
In other words, what the client cares about is being able to set an upper bound on all possible sources of delay together, no matter what their source.
> > where are all the session/transaction SET variables documented?
>
> Other than the stuff that is in the grammar we don't have many variables (just SYNTAX and DATABASE as far as I can tell, code here: https://github.com/cockroachdb/cockroach/blob/master/sql/set.go#L33)
Thanks, the code is always authoritative :)
It would be nice to start a documentation page listing these variables, to document them and provide a place for new ones that will inevitably appear in the future. Obviously not a serious problem now because there's not much there yet.
-Archie
If you're worried about network problems then it sounds like you want a client-side feature rather than anything on the server. If you don't get a response in time, kill the connection on the client side and start over. A server-side timeout can be an optimization to let you avoid the cost of reestablishing the connection, but even if the server times out there is no guarantee that word will get back to the client in a timely fashion. One drawback to a server-side timeout in a distributed database is that it is possible for a transaction to complete even after returning a timeout to the client; if a server-side timeout fires in a non-distributed database you're generally safe in assuming that the transaction did not and will not complete.