[RCBC-67] Append with :format => :plain seems to corrupt value Created: 01/Aug/12  Updated: 13/Nov/12  Resolved: 19/Oct/12

Status: Closed
Project: Couchbase Ruby client library
Component/s: None
Affects Version/s: 1.1.3
Fix Version/s: None
Security Level: Public

Type: Bug Priority: Major
Reporter: kzeller Assignee: Sergey Avseyev
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: mac osx


 Description   
>> require 'couchbase'
=> true
>> cb= Couchbase.new
=> #<Couchbase::Bucket:0x10dd89a10 "http://localhost:8091/pools/default/buckets/default/" default_format=:document, default_flags=0x0, quiet=true, connected=true, timeout=2500000>
>> cb.set('karen', 'old')
=> 1585267068834414592
>> cb.append('karen', 'new', :format => :plain)
=> 1657324662872342528
>> cb.get('karen')
Couchbase::Error::ValueFormat: unable to convert value
from /Library/Ruby/Gems/1.8/gems/yajl-ruby-1.1.0/lib/yajl/json_gem/parsing.rb:23:in `get'
from (irb):5
from :0
>>

When I telnet I get this:

Karens-MacBook-Pro:~ kzeller$ telnet localhost 11211
Trying ::1...
Connected to localhost.
Escape character is '^]'.
get karen
VALUE karen 0 8
"old"new

so the value is appended, but somehow the SDK thinks the content is JSON, not plain.

 Comments   
Comment by Sergey Avseyev [ 19/Oct/12 ]
You should also set value with plain format because append/prep end are not allowed to change flags
Generated at Sat Jul 12 17:31:22 CDT 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.