Skip to content

Instantly share code, notes, and snippets.

View PharkMillups's full-sized avatar

Mark Phillips PharkMillups

  • Helium
  • Boston / San Francisco
View GitHub Profile
adamhunter # i have three nodes in a cluster, how do i remove a node from a cluster?
seancribbs # adamhunter: I had one hang on me earlier, thought it was just Ruby
jlee # adamhunter: are you trying to simulate a failure, or scale the cluster down to two node permanently?
adamhunter # i am trying to figure out if the other two nodes are messing up the first
seancribbs # adamhunter: 0.9?
adamhunter # yeah
seancribbs # use riak_connect:remove_from_cluster/1 in the console, then wait for the handoff to finish
Damm joined #riak
Apr 22 14:52
adamhunter # i clearly must have done something wrong when i installed :) it doesn't work on any of my three nodes, tks
***From Riak IRC 5/6/2010***
chids # re: node data migration - if I understood the mailing list discussion correct issuing a "riak-admin leave" will not currently migrate the data away from the node. Instead I should attach to the console as per Grant's email. Correct?
chids # So "riak-admin leave" is currently a no-op?
chids # k, thx About the "Grant approach" is it considered solid?
hemulen # lemme look at that mail again. onesec. that looks correct, yes
you'll have to monitor the data directory to make sure all of the data has been migrated
samsonjs # is it possible to run 2 riak clusters on the same box? when i try to fire up a 2nd node w/ a different cluster name it shuts down immediately.
bingeldac # yes but you need to configure each. you can do it with make devrel and make 3 embedded riak nodes
that is probably the easiest way
samsonjs # ok i wondered if i messed up the config or not. i can't seem to find any docs on such a setup.
bingeldac # http://wiki.basho.com/display/RIAK/Home
http://wiki.basho.com/display/RIAK/Building+a+Development+Environment
covers a setup using devrel
danlarkin # maybe this question comes up a lot, but link walking is going the wrong way for me
that is, I want documents linking to this document, not the documents to which this one links
can I do that?
garrydanger # why don't you create the links on the other documents?
danlarkin # so I've got document 1 which I insert now, and then later I insert 1-1 and 1-2, and link them both to 1
can 1 walk links to 1-1 and 1-2?
garrydanger # danlarkin: you could update the parent document with the child links after you create them of course
danlarkin # I asked about this last night, but I'll try again now in a slightly different way,
I've got many threads (on different machines) between which I want to coordinate state
I thought about using riak, but I can't find any user-facing atomic operations
like a CaS or forcing creation of siblings, even if the writes happen discretely, or something
seancribbs # danlarkin: no, Riak is eventually consistent. If you want to consider an operation atomic, it is only within the context of a single request (and not within the storage mechanism)
requests do not lock anything either, so you may still end up with race-conditions
danlarkin # I would be okay with commutativity
so eventually consistent is ok
tilgovi # justinsheehy: re your recent email. are you guarenteed each node will have 1 or 2 copies (n=3) in a 2-node cluster or is it just probable? in other words, I thought the replication scheme was deterministic and vnode based. there's no guarantee the ownership of those vnodes doesn't fall entirely on one node, no?
seancribbs # tilgovi: where data is replicated to is determined by the vnode/partition. so the key is hashed to a single partition, then subsequent partitions are selected for the other copies. It just happens that adjacent partitions are not usually on the same node. the claim function tries to minimize overlap
you can be fairly certain that one node will get two copies, and the other will get 1 copy.
tilgovi # seancribbs: thanks for the explanation
so, it's the algorithm by which nodes claim vnodes that prevents contiguous vnodes from being hosted in the same place
if I understand correctly
seancribbs # yes the claim function tries to give each node an equal number of partitions and also
bradfordw # Anyone lurking this evening? I've got a use-case question moving an app from mongo -> riak/bitcask
benblack # then i encourage you to ask it :)
bradfordw # Well alright!
So, this application is collecting many, many logs... And from these logs are counters on individuals
It's not spying, it's video-game based. So, for example, frag counting. Using mongo to count things like frags, etc... is trivial. Obviously, at least to my knowledge, there isn't a similar mechanism in riak
Which is fine...
benblack # yes, tightly synchronized things often are
duiod # Are there any published benchmarks at all? of riak, in general (ideally with small objects).
benblack # there are, i believe, the basho folks would be the right ones to ask when they are around
duiod # Cool, I'll stick around.
benblack # http://twitter.com/dizzyco/status/13014285189
benblack # http://pl.atyp.us/wordpress/?p=2868
roidrage # hum, so trying to read with an n value greater than the one specified on the bucket and just one node in the cluster hangs? (i'm just playing, throwing stuff at riak, and just noticed that), getting a 500 after a couple of seconds
seancribbs # default R value is 2
add "?r=1" on the url
roidrage # oh i did, no worries, just wanted to ask if i should be worried that riak isn't too happy about having an r greater than the default
roidrage # struck me as a bit odd, that's all
seancribbs # it doesn't care, as long as R < N
jdrowell # do I need lots of RAM to be performant? the innodb tuning wiki mentions gigs of RAM. I planned to deploy riak on small slices (like 512MB RAM)
bingeldac # that would depend on the amount of keys more than anything
512 is a little small, but if you don't have a ton of data it should perform ok
though VMs have slow I/O
bingeldac # and that will slow you down regardless of the amount of data you have
jdrowell # k. I have lots of keys. does riak keep them in RAM (like redis does)?