Skip to content

Add sibling-resolution functions. #257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 14, 2013
Merged

Add sibling-resolution functions. #257

merged 3 commits into from
Jun 14, 2013

Conversation

seancribbs
Copy link

A resolver function takes a RiakObject and (hopefully) resolves its siblings into a single sibling. Resolvers are invoked automatically when fetching an object returns siblings.

The resolver can be set on the client, the bucket, or the individual object. If the object in conflict has no resolver, the bucket's resolver will be used, and then the client's resolver if the bucket has none.

The default resolver does no resolution. Also included (but not assigned) is a resolver that selects the latest sibling based on the last_modified property; see riak/resolver.py for more details.

A resolver function takes a RiakObject and (hopefully) resolves its
siblings into a single sibling. Resolvers are invoked automatically
when fetching an object returns siblings.

The resolver can be set on the client, the bucket, or the individual
object. If the object in conflict has no resolver, the bucket's
resolver will be used, and then the client's resolver if the bucket
has none.

The default resolver does no resolution. Also included (but not
assigned) is a resolver that selects the latest sibling based on the
`last_modified` property; see riak/resolver.py for more details.
@ghost ghost assigned seancribbs Jun 13, 2013
else:
raise TypeError("resolver is not a function")

def _set_resolver(self, value):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I would do the typecheck on the setter

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we are first looking at the bucket, then going to the _client, so I understand why @seancribbs put it in the getter.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with a little paranoia.

@seancribbs
Copy link
Author

Any last comments @javajolt @evanmcc?

@evanmcc
Copy link
Contributor

evanmcc commented Jun 14, 2013

Nope.
On Jun 14, 2013 6:51 AM, "Sean Cribbs" [email protected] wrote:

Any last comments @javajolt https://github.com/javajolt @evanmcchttps://github.com/evanmcc
?


Reply to this email directly or view it on GitHubhttps://github.com//pull/257#issuecomment-19458008
.

@evanmcc
Copy link
Contributor

evanmcc commented Jun 14, 2013

+1, belatedly
On Jun 14, 2013 6:58 AM, "Evan Vigil-McClanahan" [email protected]
wrote:

Nope.
On Jun 14, 2013 6:51 AM, "Sean Cribbs" [email protected] wrote:

Any last comments @javajolt https://github.com/javajolt @evanmcchttps://github.com/evanmcc
?


Reply to this email directly or view it on GitHubhttps://github.com//pull/257#issuecomment-19458008
.

@seancribbs
Copy link
Author

Thanks!

seancribbs pushed a commit that referenced this pull request Jun 14, 2013
Add sibling-resolution functions.
@seancribbs seancribbs merged commit 44215f5 into master Jun 14, 2013
@seancribbs seancribbs deleted the sdc-resolvers branch June 14, 2013 14:58
@hazen
Copy link

hazen commented Jun 14, 2013

Last words before we bid a fond farewell to the 1.4 release? like @evanmcc i'm good with it.

@seancribbs seancribbs removed their assignment May 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants