Bug when using UpdateCounterCommand and ReturnBody [JIRA: CLIENTS-652]
andrewzeneski opened this issue · 4 comments
I still have some legacy counters that I need to access/update. What are the group's thoughts on adding support?
Andrew
Hi Andrew -
You can use the FetchCounterCommand
and UpdateCounterCommand
commands to access legacy counters. Just be sure to use default
as the bucket type. I'll close this issue but feel free to re-open it if this does not work as expected.
Thanks -
Luke
Hi Luke,
I had no idea the CRDT counter protocol would work with the older 1.4 counter types, very cool. I can confirm that FetchCounterCommand
and UpdateCounterCommand
do work (mostly). However, when passing ReturnBody(true)
during an update a nil msg
value is passed to the onSuccess() method of the UpdateCounterCommand
. Getting the value back on update does not appear to work.
Andrew
OK that sounds like a bug. I'll check it out.
@lukebakken I tested this using my own implementation and this bug appears to be an issue with Riak; at least with version 2.0.6. I implemented a workaround that uses RpbCounterUpdateReq
and RpbCounterUpdateResp
when BucketType = default AND ReturnBody = true
. The changes are commented for easy removal sometime in the future. Feel free to use this if you're interested.
Andrew