Hi Ryan,

You are a rock star.  I owe you $5.

The bucket had allow_mult set to true:
$ curl 'http://10.1.2.95:8098/buckets/_rsid_ctv_tvdata/props'
{"props":{"name":"_rsid_ctv_tvdata","allow_mult":true,"basic_quorum":false,"big_vclock":50,"chash_keyfun":{"mod":"riak_core_util","fun":"chash_std_keyfun"},"dw":0,"last_write_wins":false,"linkfun":{"mod":"riak_kv_wm_link_walker","fun":"mapreduce_linkfun"},"n_val":3,"notfound_ok":false,"old_vclock":86400,"postcommit":[],"pr":0,"precommit":[],"pw":0,"r":1,"rw":1,"small_vclock":50,"w":1,"young_vclock":20}}

I fixed it in the python console since that is where I'm more comfortable.
 And just to be sure I attempted the same riak PUT both before and after.

>>> import riak
>>> r = riak.RiakClient()
>>> b = r.bucket('ctv_tvdata')
>>> o = b.get('/data/v2/search_show/TMS.Show.9838380')
>>> o.store()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/riak/riak_object.py", line
281, in store
    timeout=timeout)
  File "/usr/local/lib/python2.7/dist-packages/riak/client/transport.py",
line 127, in wrapper
    return self._with_retries(pool, thunk)
  File "/usr/local/lib/python2.7/dist-packages/riak/client/transport.py",
line 69, in _with_retries
    return fn(transport)
  File "/usr/local/lib/python2.7/dist-packages/riak/client/transport.py",
line 125, in thunk
    return fn(self, transport, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/riak/client/operations.py",
line 289, in put
    timeout=timeout)
  File
"/usr/local/lib/python2.7/dist-packages/riak/transports/http/transport.py",
line 144, in put
    return self._parse_body(robj, response, [200, 201, 204, 300])
  File
"/usr/local/lib/python2.7/dist-packages/riak/transports/http/codec.py",
line 64, in _parse_body
    self.check_http_code(status, expected_statuses)
  File
"/usr/local/lib/python2.7/dist-packages/riak/transports/http/transport.py",
line 446, in check_http_code
    (expected_statuses, status))
Exception: Expected status [200, 201, 204, 300], received 500
>>> b2 = r.bucket('_rsid_ctv_tvdata')
>>> b2.get_properties()
{'old_vclock': 86400, 'pr': 0, 'allow_mult': True, 'big_vclock': 50,
'name': '_rsid_ctv_tvdata', 'chash_keyfun': {'fun': 'chash_std_keyfun',
'mod': 'riak_core_util'}, 'n_val': 3, 'notfound_ok': False, 'linkfun':
{'fun': 'mapreduce_linkfun', 'mod': 'riak_kv_wm_link_walker'}, 'pw': 0,
'last_write_wins': False, 'r': 1, 'small_vclock': 50, 'rw': 1,
'basic_quorum': False, 'postcommit': [], 'dw': 0, 'w': 1, 'young_vclock':
20, 'precommit': []}
>>> b2.set_property('allow_mult', False)
>>> o = b.get('/data/v2/search_show/TMS.Show.9838380')
>>> o.store()
<riak.riak_object.RiakObject object at 0x250ca10>

As you can see it worked like a charm.   Thank you so much for your help.
 I never would have figured this out on my own.

Once again, you rock,

Gabe
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to