basho / riak

Riak is a decentralized datastore from Basho Technologies.
http://docs.basho.com
Apache License 2.0
3.95k stars 537 forks source link

Best way to check if a riak set object exists is by looking if context exists [JIRA: RIAK-3194] #891

Closed ovaltzer closed 7 years ago

ovaltzer commented 7 years ago

Hi, When getting a set object from riak bucket and trying to remove an item from non existing riak object in the database, it throws an exception that the context is needed to be fetched. when i'm trying to call reload() - this still won't work (no context). this is probably for new object. I would have think that the 'exists' flag will be available on the object though it isn't, so in order to check if the object exists in the database i need to check if after the get() call i got a context object.

I assume that there should be an easier way of doing that... Thanks, Oded

lukebakken commented 7 years ago

reload() is specific to the Python client. Could you please open an issue here with code to reproduce your issue? Thanks.