← Back to team overview

openstack team mailing list archive

Re: Swift questions

 

Hi Mark,

On Tue, May 21, 2013 at 6:46 PM, Mark Brown <ntdeveloper2002@xxxxxxxxx>wrote:

> Hello,
> I had a few more basic Swift questions..
>
> 1. In Swift, when a rebalance is happening, does the client have write
> access to the object? Does Swift have a mechanism to lock down one copy
> which it is moving, and allow updates to the remaining two copies and do a
> final sync somehow? What is the mechanism?
>

When the ring rebalances, it is allowed to only move one replica of a
partition.  This guarantees that you still have 2 available while
replication is moving the partitions around.



> 2. I did see that Swift has a configurable number of replicas. Can it be
> set to 1? If it is set to 1, how does it work for the question above w.r.t
> rebalance? I do understand a single replica does not make sense, I did want
> to understand what it does in that case though.
>

It can be set to 1, and I think the default devstack install may do exactly
that. Pretty much any guarantees of swift go out the window with 1 replica.
 I would expect that the partitions that are being moved would not be
available until replication has moved them.


> 3. If one of the nodes returns an error during a PUT(say, disk full), the
> request is sent to the handoff node, but how is the handoff node configured
> in the ring? Is it a special entry, or is it picked based on some algorithm
> or something else?
>

There is an algorithm in the ring code that deterministically determines
the handoff nodes.

--
Chuck

Follow ups

References