update objects in precommit hooks

Damian Dobroczyński qoocku at gmail.com
Fri Apr 1 05:43:05 EDT 2011


Hi, list!

I'm trying to update object metadata dictionary within my precommit hook
(in Erlang) using `riak_object:update_metadata/2' like this:

  Old = riak_object:get_metadata(O),
  New = dict:store(<<"X-my-metadata-name">>, Value, Old),
  NewObject = riak_object:update_metadata(O, New),

Unfortunately, the retrieved object does not contain the new keys. Where
can be the problem?

-- D.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x0CAE3AEB.asc
Type: application/pgp-keys
Size: 5071 bytes
Desc: not available
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20110401/cdaf20c7/attachment.asc>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20110401/cdaf20c7/attachment-0001.asc>


More information about the riak-users mailing list