Skip to content

Instantly share code, notes, and snippets.

@PharkMillups
Created May 14, 2010 18:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PharkMillups/401491 to your computer and use it in GitHub Desktop.
Save PharkMillups/401491 to your computer and use it in GitHub Desktop.
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 # garrydanger: my problem is parallel execution.. many threads creating documents that I want to be linked -- so I don't think I can update a single document with links to all of them, since riak doesn't have a CaS operation
that I've run across, anyway
danlarkin # if there's a "right way" to handle this situation I'd like to know
danlarkin # allow_mult stores siblings only for concurrent updates, but in my situation updates could happen discretely, but still overwrite links, afaik?
garrydanger # yeah, thats a tough one
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment