In the official Python client, every object of the RiakObject class has a siblings property that provides access to a list of an object’s sibling values. If there are no siblings, that property will return a list with only one item. Here’s an example of an object with siblings:
PYTHON
PYTHON
bucket = client.bucket('seahawks') obj = bucket.get('coach') obj.siblings# The output:
Output:[<riak.content.RiakContent object at 0x106cc51d0>, <riak.content.RiakContent object at 0x108x1da62c1>]
So what happens if the length of obj.siblings is greater than 1, as in the case above? The easiest way to resolve siblings automatically with the Python client is to create a conflict-resolving function that takes a list of sibling values and returns a single value. Such resolution functions can be registered either at the object level or the bucket level.
buran write May-04-2023, 08:59 AM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.