Skip to content

Instantly share code, notes, and snippets.

@PharkMillups
Created September 17, 2010 17:08
Show Gist options
  • Select an option

  • Save PharkMillups/584557 to your computer and use it in GitHub Desktop.

Select an option

Save PharkMillups/584557 to your computer and use it in GitHub Desktop.
12:11 <technoweenie> hey, how can i simulate a riak version conflict to test conflict resolution?
12:11 <benblack> turn on allow_multi
12:11 <benblack> and do multiple puts to the same key without passing a clock
12:11 <technoweenie> oh ok, that simple then
12:12 <technoweenie> i'd have to fetch it twice so they have the same vclock right?
12:12 <benblack> fetch it twice?
12:12 <technoweenie> if i'm going to do 2 puts
12:13 <technoweenie> nvm i'm looking at this from a higher level. if we're talking just http
then my question is moot
12:13 <ericflo> technoweenie: No you explicitly don't want it to have the same vclock
12:13 <technoweenie> hm ok
12:14 <ericflo> technoweenie: both PUTs should have no X-Riak-Vclock header
12:14 <ericflo> technoweenie: which means it won't be able to determine causality
12:15 <ericflo> technoweenie: which means it'll necessarily create siblings (conflict)
12:15 <ericflo> correct me if I'm wrong benblack
12:16 <technoweenie> i guess i figured if you give the same vclock, it'd do the same thing.
12:16 <ericflo> technoweenie: Oh I see what you're saying, yeah, that should work too
12:16 <technoweenie> i'm imagining 2 clients getting an object w/ a vclock, and then putting new
values by passing the same vclock
12:17 <benblack> that is equivalent
12:17 <technoweenie> ok cool
12:17 <technoweenie> thanks guys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment