Several questions about CockroachDB

59 views
Skip to first unread message

joshu...@gmail.com

unread,
Jun 9, 2016, 8:02:46 PM6/9/16
to CockroachDB

Sorry if you are receiving this twice, but I cannot find the trace of my post, so I'm writing again.



1. I wanted to manually change the leader for a range, and I found there is a command called "LeaderLease". How could I use this?

2. Can raft leader delay the propagation of the updated value? Sometimes, I want to be able to just write at one instance (leader) to make write operation faster.

3. Is it possible for me to choose which instances will have replicas?

4. If I run cockroachdb with only one instance.. would raft still be used in order to update a value?


Thanks!

joshu...@gmail.com

unread,
Jun 9, 2016, 9:17:15 PM6/9/16
to CockroachDB
Please let me know if my questions are not too clear!

For question 3, to be more specific, if there are 5 instances running, can I choose instance 1,2,5 to have replicas of data 'a' ?


Vivek Menezes

unread,
Jun 9, 2016, 9:32:24 PM6/9/16
to joshu...@gmail.com, CockroachDB
On Thu, Jun 9, 2016 at 8:02 PM <joshu...@gmail.com> wrote:

Sorry if you are receiving this twice, but I cannot find the trace of my post, so I'm writing again.



1. I wanted to manually change the leader for a range, and I found there is a command called "LeaderLease". How could I use this?

2. Can raft leader delay the propagation of the updated value? Sometimes, I want to be able to just write at one instance (leader) to make write operation faster.


I think you are asking for non-durable writes. We do not support that.

 
3. Is it possible for me to choose which instances will have replicas?


We do not support that although we are adding similar functionality for internal testing. We do not expect to export those features unless there is a compelling use case for them.
 
4. If I run cockroachdb with only one instance.. would raft still be used in order to update a value?

No. A single instance is a standalone server that is not a part of a cockroach cluster and will be unable to use raft.

It will be valuable to better understand why you need all these features. Thanks

Vivek
 


Thanks!

--
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.

Tobias Schottdorf

unread,
Jun 9, 2016, 9:48:37 PM6/9/16
to Vivek Menezes, joshu...@gmail.com, CockroachDB
Hi Joshua,

1. LeaderLease is an internal command. It's not available for external use, though we're working on a leadership transfer mechanism (https://github.com/cockroachdb/cockroach/pull/6999). We also don't have plans to expose that directly (but we may instead offer something like a preferred leadership location via zone configs), but please do let us know what you're trying to do.

2. No, not currently, but having asynchronous followers is something we may consider at later stages in the development. It's not terribly difficult to implement in Raft (it amounts to adding non-voting replicas).

3. Yes, that is handled through zone configs. More precisely, you can specify free-text attributes for each node (such as location, type, ...) and then configure the zone configs so that they ask for certain attributes for the replicas of your data. See https://www.cockroachlabs.com/docs/configure-replication-zones.html (I think there's an open issue for that, so something may not work at the moment - in any case, that's how it *should* work).

4. When you run a single node, Raft will still be used. We could optimize that away for performance, but for now we've shied away from making a single-node cluster behave differently from most "real" deployments (which are mostly going to be multi-node).
--

-- Tobias

joshu...@gmail.com

unread,
Jun 9, 2016, 9:59:19 PM6/9/16
to CockroachDB, vivek....@gmail.com, joshu...@gmail.com
Thanks Tobias and Viviek !

My goal was to build the layer on top of db, which can make some decisions on how to interact with data based many things. So, I wanted to know how flexible CockroachDB is in terms of the ability to modify how nodes interact with each other, how data propagates and etc. 
It's little unfortunate for me that 1 and 2 are not supported yet. Especially because I really liked the design and goal of CockroachDB.

Vivek Menezes

unread,
Jun 10, 2016, 8:15:30 AM6/10/16
to joshu...@gmail.com, CockroachDB

Joshua,

Can you use it as a SQL database and not bother about the implementation?

We would prefer if you can file issues based on observed problems.

Thanks for your interest in cockroachdb

Thanks

Reply all
Reply to author
Forward
0 new messages