Bucket "..." rebalance does not seem to be swap rebalance

1,660 views
Skip to first unread message

Lasse Schou

unread,
May 12, 2013, 2:59:25 PM5/12/13
to couc...@googlegroups.com
Hi,

I have a Couchbase cluster (Community 2.0.1) with 5 machines, and I've tried this situation twice:

- One node fails over
- I click "Add back"
- I start rebalance
- A full rebalance starts, and in the log it says "Bucket "[bucket-name]" rebalance does not seem to be swap rebalance"

In the docs it says "When a node has failed, removing it and adding a replacement node, or adding the node back, will be treated as swap rebalance." (link: http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-admin-tasks-addremove-rebalance-swap.html)

Now my question is, why isn't a swap balance happening in this case?

Matt Ingenthron

unread,
May 12, 2013, 3:13:49 PM5/12/13
to couc...@googlegroups.com
On 5/12/13 11:59 AM, "Lasse Schou" <lasse...@gmail.com> wrote:

In the docs it says "When a node has failed, removing it and adding a replacement node, or adding the node back, will be treated as swap rebalance." (link: http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-admin-tasks-addremove-rebalance-swap.html)

Now my question is, why isn't a swap balance happening in this case?

I believe the docs are referring to a situation where you add a node at the time you trigger a failover, followed by a subsequent rebalance.  While it may not be considered a swap rebalance, it's similar in that data movement is minimized.

Consdider nodes in a cluster:
A B C

If I want to remove B and add D, I can do it in a "swap rebalance":
pre-rebalance: A B C
post-rebalance: A D C
(all vbuckets on B move to D)

This would be done by adding D and removing B before starting the rebalance.

Hope that helps,

Matt



-- 
Matt Ingenthron
Couchbase, Inc.

Lasse Schou

unread,
May 12, 2013, 3:16:46 PM5/12/13
to couc...@googlegroups.com
Hi Matt,

Ahh, so the docs are not talking about a failed over node, but rather a failed node that is removed, not failed over.

So can you confirm that if a node is auto-failed-over, there's no way to use a swap rebalance when adding the server back?

Thanks again, Lasse


2013/5/12 Matt Ingenthron <ma...@couchbase.com>

--
You received this message because you are subscribed to a topic in the Google Groups "Couchbase" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/couchbase/-jWd9DZd_60/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to couchbase+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Aliaksey Kandratsenka

unread,
May 12, 2013, 3:55:02 PM5/12/13
to couc...@googlegroups.com
On Sun, May 12, 2013 at 12:16 PM, Lasse Schou <lasse...@gmail.com> wrote:
Hi Matt,

Ahh, so the docs are not talking about a failed over node, but rather a failed node that is removed, not failed over.

So can you confirm that if a node is auto-failed-over, there's no way to use a swap rebalance when adding the server back?


Technically speaking, swap rebalance is when you swap one (or few) member nodes with same number of  brand new nodes. Failed over nodes are not full members. Because they don't have any active vbuckets left after fail over.

But we do detect failover-add-back (with original node or old node, doesn't matter) and we do generate vbucket map that's optimal. I.e. all vbuckets that were failed over are simply moved back.

So docs are only incorrect by calling all those cases swap rebalance.

Reply all
Reply to author
Forward
0 new messages