[RCBC-184] hashkey needs to be marked as volatile and clear that it's experimental and libmemcached compat oriented Created: 10/Sep/14  Updated: 10/Sep/14  Resolved: 10/Sep/14

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

Type: Bug Priority: Blocker
Reporter: Matt Ingenthron Assignee: Mark Nunberg
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
This isn't described correctly in the API documentation and needs to be.

Please do so in any source code as well so it's not accidentally discovered. This is not a feature of the system currently.

 Comments   
Comment by Sergey Avseyev [ 10/Sep/14 ]
Ruby client does not support hashkey and therefore does not mention




[RCBC-172] jruby engine skeleton Created: 01/May/14  Updated: 01/May/14  Resolved: 01/May/14

Status: Resolved
Project: Couchbase Ruby client library
Component/s: None
Affects Version/s: None
Fix Version/s: 2.0.0.alpha
Security Level: Public

Type: New Feature Priority: Critical
Reporter: Sergey Avseyev Assignee: Sergey Avseyev
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Provide build environment for java-specific extension




[RCBC-173] Cluster: initialize and connect instance Created: 01/May/14  Updated: 01/May/14  Resolved: 01/May/14

Status: Resolved
Project: Couchbase Ruby client library
Component/s: None
Affects Version/s: None
Fix Version/s: 2.0.0.alpha
Security Level: Public

Type: New Feature Priority: Critical
Reporter: Sergey Avseyev Assignee: Sergey Avseyev
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified





[RCBC-166] Crash with eventmachine backend Created: 20/Mar/14  Updated: 20/Mar/14  Resolved: 20/Mar/14

Status: Resolved
Project: Couchbase Ruby client library
Component/s: None
Affects Version/s: 1.3.6
Fix Version/s: 1.3.7
Security Level: Public

Type: Bug Priority: Critical
Reporter: Sergey Avseyev Assignee: Sergey Avseyev
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: ruby 2.0.0p353
eventmachine (1.0.3) 2ed44025e35518898c8589a610515e54a7b40c44
em-synchrony (1.0.3) ad17ce925fe49c45e1b5f713910e24d4798ae29c
couchbase (1.3.6)
  

Attachments: File Gemfile     File test.rb    

 Description   
ruby: ed.cpp:927: virtual void ConnectionDescriptor::Write(): Assertion `!bWatchOnly' failed.

#0 0x00007fd28b6bbc39 in __GI_raise (sig=sig@entry=0x6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007fd28b6bd348 in __GI_abort () at abort.c:89
#2 0x00007fd28b6b4b96 in __assert_fail_base (fmt=0x7fd28b801d88 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7fd28177eb26 "!bWatchOnly", file=file@entry=0x7fd28177e9a8 "ed.cpp", line=line@entry=0x3a7, function=function@entry=0x7fd28177edc0 <ConnectionDescriptor::Write()::__PRETTY_FUNCTION__> "virtual void ConnectionDescriptor::Write()") at assert.c:92
#3 0x00007fd28b6b4c42 in __GI___assert_fail (assertion=0x7fd28177eb26 "!bWatchOnly", file=0x7fd28177e9a8 "ed.cpp", line=0x3a7, function=0x7fd28177edc0 <ConnectionDescriptor::Write()::__PRETTY_FUNCTION__> "virtual void ConnectionDescriptor::Write()") at assert.c:101
#4 0x00007fd28177799d in ConnectionDescriptor::Write() () from /home/avsej/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/eventmachine-2ed44025e355/lib/rubyeventmachine.so
#5 0x00007fd281764b18 in EventMachine_t::_RunEpollOnce() () from /home/avsej/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/eventmachine-2ed44025e355/lib/rubyeventmachine.so
#6 0x00007fd28176489d in EventMachine_t::_RunOnce() () from /home/avsej/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/eventmachine-2ed44025e355/lib/rubyeventmachine.so
#7 0x00007fd281764808 in EventMachine_t::Run() () from /home/avsej/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/eventmachine-2ed44025e355/lib/rubyeventmachine.so
#8 0x00007fd281762262 in evma_run_machine () from /home/avsej/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/eventmachine-2ed44025e355/lib/rubyeventmachine.so
#9 0x00007fd28175f42c in t_run_machine_without_threads(unsigned long) () from /home/avsej/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/bundler/gems/eventmachine-2ed44025e355/lib/rubyeventmachine.so
#10 0x00007fd28c9af4b2 in vm_call_cfunc_with_frame (th=th@entry=0x7fd28defb590, reg_cfp=reg_cfp@entry=0x7fd28c799ed0, ci=ci@entry=0x7fd28ef08980) at vm_insnhelper.c:1474
#11 0x00007fd28c9afa9e in vm_call_cfunc (ci=0x7fd28ef08980, reg_cfp=0x7fd28c799ed0, th=0x7fd28defb590) at vm_insnhelper.c:1564
#12 vm_call_method (th=0x7fd28defb590, cfp=0x7fd28c799ed0, ci=0x7fd28ef08980) at vm_insnhelper.c:1758
#13 0x00007fd28c9a9254 in vm_exec_core (th=th@entry=0x7fd28defb590, initial=initial@entry=0x0) at insns.def:1017
#14 0x00007fd28c99d43b in vm_exec (th=th@entry=0x7fd28defb590) at vm.c:1201
#15 0x00007fd28c99e704 in rb_iseq_eval_main (iseqval=iseqval@entry=0x7fd28ede6a08) at vm.c:1449
#16 0x00007fd28c849d2a in ruby_exec_internal (n=0x7fd28ede6a08) at eval.c:250
#17 0x00007fd28c84dc4d in ruby_exec_node (n=0x7fd28ede6a08) at eval.c:315
#18 ruby_run_node (n=<optimized out>) at eval.c:307


 Comments   
Comment by Sergey Avseyev [ 20/Mar/14 ]
http://review.couchbase.org/34738
Comment by Sergey Avseyev [ 20/Mar/14 ]
Thanks buger from community site for reporting the issue http://www.couchbase.com/communities/q-and-a/error-while-using-ruby-sdk-eventmachine




[RCBC-168] DNS SRV helper for connection constructor Created: 26/Mar/14  Updated: 18/Apr/14  Resolved: 18/Apr/14

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

Type: New Feature Priority: Major
Reporter: Sergey Avseyev Assignee: Sergey Avseyev
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
http://www.couchbase.com/wiki/display/couchbase/Alternative+Bootstrap+with+DNS+SRV

 Comments   
Comment by Sergey Avseyev [ 18/Apr/14 ]
http://review.couchbase.org/36009




[RCBC-160] increment method increments negative value, contrary to method description Created: 15/Jan/14  Updated: 17/Jan/14  Resolved: 16/Jan/14

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

Type: Task Priority: Major
Reporter: deepak vohra Assignee: Sergey Avseyev
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
The method description of increment indicates:
"Couchbase Server stores numbers as unsigned numbers, therefore if you try to increment an existing negative number, it will cause an integer overflow and return a non-logical numeric result. "

But, if the increment makes the value a positive number the increment is applied and integer overflow does not occur. The integer overflow occurs only if after the increment the value is still negative.

Example does not generate error:
require 'rubygems'
require 'couchbase'
client = Couchbase.connect("http://localhost:8091")
client.set("2",-1)
client.increment("2",2)


Example generates error:
require 'rubygems'
require 'couchbase'
client = Couchbase.connect("http://localhost:8091")
client.set("2",-3)
client.increment("2",2)


 Comments   
Comment by Sergey Avseyev [ 16/Jan/14 ]
It is not a bug again. It just happened to look like working in some cases. Look at the patch here, where I have updated the ruby doc on this topic with the example.

http://review.couchbase.org/#/c/32543/1/ext/couchbase_ext/arithmetic.c

And yes, it should be a bug in the docs, but I didn't managed to find the same phrase in ruby docs. Could you give a link where you found it?
Comment by deepak vohra [ 16/Jan/14 ]
http://www.couchbase.com/docs/couchbase-sdk-ruby-1.0/couchbase-sdk-ruby-update-incr.html
Comment by Sergey Avseyev [ 16/Jan/14 ]
I recommend you to use the docs, generated from the library sources. The are located here http://www.couchbase.com/autodocs/

Also you can find docs from the rubygems site: http://rubygems.org/gems/couchbase
Comment by deepak vohra [ 16/Jan/14 ]
What is the difference between "# but it might look like working" and actually getting implemented?

The value output in subsequent get is accurate.

Or, is it the actual number being stored not being the number being retrieved with get?
Comment by Sergey Avseyev [ 17/Jan/14 ]
I mean, that what you are saying "generates error" is not an error at all. Just 64-bit integer wraps. Consider the following example

1.9.3p484 (main):001:0> require 'rubygems'
false
1.9.3p484 (main):002:0> require 'couchbase'
true
1.9.3p484 (main):003:0> client = Couchbase.connect("http://localhost:8091")
#<Couchbase::Bucket:0x000000014beeb0 "http://localhost:8091/pools/default/buckets/default/" transcoder=Couchbase::Transcoder::Document, default_flags=0x0, quiet=false, connected=true, timeout=2500000>
1.9.3p484 (main):004:0> client.set("2",-3)
11832122541421297664
1.9.3p484 (main):005:0> client.increment("2",2)
18446744073709551615
1.9.3p484 (main):006:0> client.get("2")
18446744073709551615
1.9.3p484 (main):007:0> client.increment("2",1)
0
1.9.3p484 (main):008:0> client.increment("2",1)
1

Do you see that it shows you "that garbage without any sense" just because you are incrementing not enough (in your first example, you have chosen the value bigger that absolute value of the number stored on the server"

The key point is that the server is storing the ascii representation of the number, this is why you can put negative number via set. But during increment it parse the number as signed 64bit integer and store into unsigned 64bit integer
Comment by deepak vohra [ 17/Jan/14 ]
Why does the PHP-equivalent method increment does not return the unsigned 64bit integer?

With the PHP Client library the following increment returns -4.

echo $cb->set("5", -5); //CAS value 10388951051056250880
   
echo $cb->increment("5", 1);//-4

But, the equivalent in Ruby returns the unsigned 64bit integer.

print client.set("5",-5) //CAS value 15131633266817368064
 print "\n<br>";
print client.increment("5",1) //18446744073709551612

Is the Ruby Client not applying the required conversion from the stored unsigned 64bit integer to the negative number?
 
Comment by Sergey Avseyev [ 17/Jan/14 ]
because php client returns you signed values and doesn't use uint64_t at all. ruby version gives you true unsigned value, as the server see it. There is no integer overflow in ruby actually. The numbers limited by the machine RAM only
Comment by deepak vohra [ 17/Jan/14 ]
Updated:
Is the Ruby Client not applying the required conversion from the stored unsigned 64bit integer to the signed value?

Should the statement about integer overflow be removed?
Comment by Sergey Avseyev [ 17/Jan/14 ]
the overflow still exists on the server. I just said that in ruby you can represent large numbers transparently

2.2.0p-1 (main):005:0> client.set("foo", -2)
8708394884148625408
2.2.0p-1 (main):006:0> client.incr("foo").class
Bignum
2.2.0p-1 (main):007:0> client.incr("foo").class
Fixnum

you see, it was expanded UINT64_MAX into Bignum, because it doesn't fit Fixnum on my computer, and then when I've incremented it twice it can fit Fixnum again.
Comment by deepak vohra [ 17/Jan/14 ]
The PHP client also stores the incremented value as unsigned 64bit integer and not the actual signed value, but returns the signed value.




[RCBC-161] :format set as :marshal generates Couchbase::Error::ValueFormat Created: 15/Jan/14  Updated: 16/Jan/14  Resolved: 16/Jan/14

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

Type: Task Priority: Major
Reporter: deepak vohra Assignee: Sergey Avseyev
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
If the :format is set as :marshal in get method the Couchbase::Error::ValueFormat error is generated regradless of the type of value: numerical, string or JSON object.


   
client = Couchbase.connect("http://localhost:8091")
print client.set("catalog","journal")
print client.get("catalog",:format => :marshal)

#print client.set("3", 1)
#print client.get("3",:format => :marshal)

 Comments   
Comment by Sergey Avseyev [ 16/Jan/14 ]
This is not a bug

What behaviour do you expect?

When you don't specify format, it will use default transcoder class (you can find out using Couchbase::Bucket#transcoder method). In your example, it is easy to see what going on. Look at this IRB session

1.9.3p484 (main):001:0> require 'couchbase'
true
1.9.3p484 (main):002:0> client = Couchbase.connect
#<Couchbase::Bucket:0x00000001fd88a0 "http://localhost:8091/pools/default/buckets/default/" transcoder=Couchbase::Transcoder::Document, default_flags=0x0, quiet=false, connected=true, timeout=2500000>
1.9.3p484 (main):003:0> client.transcoder
Couchbase::Transcoder::Document
1.9.3p484 (main):004:0> client.set("catalog", "journal")
2508196931084222464
1.9.3p484 (main):005:0> client.get("catalog", :transcoder => nil)
"\"journal\""
1.9.3p484 (main):006:0> client.set("catalog", "journal", :format => :marshal)
6806784347694170112
1.9.3p484 (main):007:0> client.get("catalog", :transcoder => nil)
"\u0004\bI\"\fjournal\u0006:\u0006ET"
Comment by deepak vohra [ 16/Jan/14 ]
What is the :marshal format for? No example of :marshal is provided?
Comment by Sergey Avseyev [ 16/Jan/14 ]
:format option is legacy shortcut for specifying transcoder, which in charge of serializing values before putting them on wires and deserialise before passing back to user. in particular :marshal sets 'transcoder' attribute of connection to Couchbase::Transcoder::Marshal which is defined here https://github.com/couchbase/couchbase-ruby-client/blob/master/lib/couchbase/transcoder.rb#L74-L94

Using transcoders is more flexible but sometimes more verbose way to describe the value encoding. There only three formats supported: marshal (ruby's Marshal from stdlib), document (JSON) and plain (no transformations, but setting flags). In examples directory you can find user-defined transcoder, which performs compression (you can stack your transcoders) https://github.com/couchbase/couchbase-ruby-client/tree/master/examples/transcoders




[RCBC-93] Ruby Client does not handle the timeout appropriately Created: 24/Oct/12  Updated: 13/Jan/14  Resolved: 13/Jan/14

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

Type: Bug Priority: Major
Reporter: Anonymous Assignee: Sergey Avseyev
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: Ruby client 1.1.1

Attachments: File couch.rb    

 Description   
This is the problem that the customer is encountering
(Ruby code coming up):

Timeout::timeout(2) do
couch_client.get(key)
end

But we are seeing Couchbase::Error::Timeout exceptions being raised. I know the default timeout for the Couchbase client gem is greater than 2 seconds, so I'm wondering: what could cause Couchbase to return a timeout (0x16 error code) before it actually has time to timeout?

The complete ruby source code is attached , Please take a look at it.

------
support's analysis:
 The client is not timing out fast enough it should time out in 2.5 sec or something but instead it's waiting a long time.



 Comments   
Comment by Sergey Avseyev [ 13/Jan/14 ]
The issue was likely fixed in libcouchbase and currently is not reproducing




[RCBC-177] Consistently recieving no more bootstrap providers remain under a small load Created: 02/Jun/14  Updated: 27/Aug/14  Resolved: 17/Jun/14

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

Type: Bug Priority: Major
Reporter: Stephen von Takach Assignee: Sergey Avseyev
Resolution: Incomplete Votes: 0
Labels: windows
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: Windows Server 2012 R2
Ruby 1.9.3
Config:
production:
  hostname: <%= ENV['COUCHBASE_HOST'] %>
  port: <%= ENV['COUCHBASE_PORT'] %>
  username: <%= ENV['COUCHBASE_USERNAME'] %>
  password: <%= ENV['COUCHBASE_PASSWORD'] %>
  pool: <%= ENV['COUCHBASE_POOL'] %>
  bucket: <%= ENV['COUCHBASE_BUCKET'] %>

Attachments: File couchbase-1.3.9.lcb2.3.1.4-x64-mingw32.gem     File couchbase-1.3.9.lcb2.3.1.4-x86-mingw32.gem    

 Description   
Using defaults to connect to a two server cluster and performing queries in a thread pool
As soon as there are a few concurrent requests some of them fail with: No more bootstrap providers remain (error=0x17)

My work around was to revert to using gem version 1.3.6 which works well on the same workloads
I noticed there was some changes to the bootstrap configuration between versions 1.3.6 and 1.3.7


 Comments   
Comment by Sergey Avseyev [ 10/Jun/14 ]
Could you also post libcouchbase version?

> Couchbase.libcouchbase_version
Comment by Sergey Avseyev [ 10/Jun/14 ]
I've built the gem with the most recent libcouchbase, where this issues might be fixed already. Could you try it?
Comment by Stephen von Takach [ 26/Aug/14 ]
Started noticing this issue again on a brand new deployment using the latest released gem. So have reverted back to the previous release.
I've only seen the issue on production systems and I haven't been keen to test the attachments as I get slammed pretty hard when things don't work.

This was a fresh install using the latest releases of Couchbase as of the 18/Aug/14 on Windows Servers 2012 R2
The issue was occurring on two different servers built at the same time.

Never seen the issue in staging or development however I can't realistically replicate the load.
Comment by Sergey Avseyev [ 27/Aug/14 ]
do you mean 1.3.9 as "the latest"?
Comment by Stephen von Takach [ 27/Aug/14 ]
Ruby 1.9.3 x86 for windows
Couchbase Ruby Client - 1.3.8 (had the issue) reverted to 1.3.6 which doesn't have this issue.
Couchbase Windows 2.5.1

Must have deployed before the 1.3.9 release.
Comment by Stephen von Takach [ 27/Aug/14 ]
Do you think this should be resolved for 1.3.9?
Comment by Sergey Avseyev [ 27/Aug/14 ]
yes, I think so




[RCBC-179] Ruby Client Library on Mac OS 10.8 and 10.9 Incorrect Created: 13/Aug/14  Updated: 19/Aug/14  Resolved: 19/Aug/14

Status: Resolved
Project: Couchbase Ruby client library
Component/s: docs, library
Affects Version/s: 1.3.8
Fix Version/s: None
Security Level: Public

Type: Task Priority: Major
Reporter: Austin Gonyou Assignee: Sergey Avseyev
Resolution: Fixed Votes: 0
Labels: supportability
Remaining Estimate: 8h
Time Spent: Not Specified
Original Estimate: 8h
Environment: Mac OS 10.8, 10.9, and 10.10

Attachments: Microsoft Word Installing Couchbase Ruby API on Mac OS.docx    

 Description   
I found that the instructions provided using the following web-sites are incorrect and do not yield a successful libcouchbase/client environment suitable for PoC or test purposes. I traced the issue to permissions and created a work around in the attached document. I would like someone to review

 Comments   
Comment by Austin Gonyou [ 13/Aug/14 ]
I just realized I needed to add the URLs.

1. Ruby Client Install Page: http://www.couchbase.com/communities/c-client-library
2. Ruby SDK Page: http://docs.couchbase.com/couchbase-sdk-ruby-1.3/index.html#getting-started
3. Mac OS Home Brew Instructions: http://www.couchbase.com/autodocs/couchbase-ruby-client-1.3.8/index.html#MacOS__Homebrew_

Comment by Austin Gonyou [ 13/Aug/14 ]
Please review my word Doc in relation to the information contained on the URLs provided.
Comment by Sergey Avseyev [ 19/Aug/14 ]
http://review.couchbase.com/40730




[RCBC-180] Documentation links to old docs Created: 16/Aug/14  Updated: 16/Aug/14  Resolved: 16/Aug/14

Status: Resolved
Project: Couchbase Ruby client library
Component/s: docs
Affects Version/s: 1.3.8
Fix Version/s: None
Security Level: Public

Type: Bug Priority: Minor
Reporter: Patrick Varley Assignee: Sergey Avseyev
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment: http://www.couchbase.com/autodocs/couchbase-ruby-client-1.3.8/index.html


 Description   
The "API documentation" link under the Support title links to the older 1.3.4 API docs.

http://www.couchbase.com/autodocs/couchbase-ruby-client-1.3.8/index.html#SUPPORT

 Comments   
Comment by Sergey Avseyev [ 16/Aug/14 ]
http://review.couchbase.com/40674




Generated at Sat Sep 20 11:32:23 CDT 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.