-
Notifications
You must be signed in to change notification settings - Fork 55
Description
I'm trying to delete a register from a map, also trying to delete a counter from a map.
Code:
map = Riak.find("maps", "test_maps", "test1")
Riak.CRDT.Map.delete(map, "test_reg")
|> Riak.update("maps", "test_maps", "test1")
Error:
** (exit) an exception was raised:
** (FunctionClauseError) no function clause matching in :riak_pb_dt_codec.encode_map_field/1
(riak_pb 2.3.2) src/riak_pb_dt_codec.erl:116: :riak_pb_dt_codec.encode_map_field("reg1")
(riak_pb 2.3.2) src/riak_pb_dt_codec.erl:428: :riak_pb_dt_codec.encode_map_op_update/2
(riak_pb 2.3.2) src/riak_pb_dt_codec.erl:473: :riak_pb_dt_codec.encode_operation/2
(riak_pb 2.3.2) src/riak_pb_dt_codec.erl:500: :riak_pb_dt_codec.encode_update_request/4
(riakc 2.5.3) src/riakc_pb_socket.erl:1246: :riakc_pb_socket.update_type/5
(riak 1.1.6) lib/riak.ex:264: Riak.update/4
I tried many different ways to delete a key/value pair from a map, but unable to do so.
Am I doing something wrong?
I am able to update a map when replacing a key/value pair by using the put function instead of the delete.