Writing with PW=quorum

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Writing with PW=quorum

Daniel Iwan
Hi

If I have N=3 and writing with PR=quorum, PW=quorum and there is network partitioning so that 2 primary replicas are not available (or are down) write will fail. But I guess it's still possible (or rather certain) that 3rd primary replica have written that data. Is that correct?
If that's the case, what's the best way to deal with such a  situation?
Ideally I would like to delete that entry and make sure it won't be visible to other nodes.
Is that possible? Or would delete fail because PR's quorum is not met? If one primary replica came back would next read (for example delete) read-repair the entry?

I've read:
http://riak-users.197444.n3.nabble.com/Absolute-consistency-td3635356.html

but I'm still not sure what to expect.

Thanks
Daniel
Reply | Threaded
Open this post in threaded view
|

Re: Writing with PW=quorum

Sean Cribbs-2
Sorry that this didn't make it to the list, I accidentally sent to Daniel privately.

In short, PR and PW are checked *before* any read or write is initiated, so, in the case of a partitioned cluster, the write will never be sent to the sole primary partition that is available if PW=quorum. On deletes, both PR and PW will be used/checked, so a delete can also be interrupted by insufficiently available primary partitions.

On Wed, Feb 29, 2012 at 6:13 PM, ivenhov <[hidden email]> wrote:
Hi

If I have N=3 and writing with PR=quorum, PW=quorum and there is network
partitioning so that 2 primary replicas are not available (or are down)
write will fail. But I guess it's still possible (or rather certain) that
3rd primary replica have written that data. Is that correct?
If that's the case, what's the best way to deal with such a  situation?
Ideally I would like to delete that entry and make sure it won't be visible
to other nodes.
Is that possible? Or would delete fail because PR's quorum is not met? If
one primary replica came back would next read (for example delete)
read-repair the entry?

I've read:
http://riak-users.197444.n3.nabble.com/Absolute-consistency-td3635356.html

but I'm still not sure what to expect.

Thanks
Daniel


--
View this message in context: http://riak-users.197444.n3.nabble.com/Writing-with-PW-quorum-tp3788974p3788974.html
Sent from the Riak Users mailing list archive at Nabble.com.

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com



--
Sean Cribbs <[hidden email]>
Software Engineer
Basho Technologies, Inc.


_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: Writing with PW=quorum

Daniel Iwan
That's perfect and exactly what I needed. Basically I want to make sure that write does not happen in case of network partitioning, which PW was made for I presume.
If PR/PW is defined/set on a bucket, do write and read still care about W and R settings?
If yes, then I guess for every read, write only following settings are valid PR<=R and PW<=W ?

Daniel
Reply | Threaded
Open this post in threaded view
|

Re: Writing with PW=quorum

Sean Cribbs-2
Yes, they control independent issues. PR and PW do not affect how many replies are waited for before returning a successful response to the client. PR and PW can be set higher than R and W/DW.

On Thu, Mar 1, 2012 at 2:04 PM, ivenhov <[hidden email]> wrote:
That's perfect and exactly what I needed. Basically I want to make sure that
write does not happen in case of network partitioning, which PW was made for
I presume.
If PR/PW is defined/set on a bucket, do write and read still care about W
and R settings?
If yes, then I guess for every read, write only following settings are valid
PR<=R and PW<=W ?

Daniel

--
View this message in context: http://riak-users.197444.n3.nabble.com/Writing-with-PW-quorum-tp3788974p3791447.html
Sent from the Riak Users mailing list archive at Nabble.com.

_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com



--
Sean Cribbs <[hidden email]>
Software Engineer
Basho Technologies, Inc.


_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com