Details
-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
1.4.4
-
Security Level: Public
-
None
Description
This was observed on Couchbase Server 2.2.0. The same behavior is not evident on Couchbase Server 2.5.1. It appears to be independent of any Java client version. The very first call of asyncGetBulk does not respect the timeout value, and continues to process and wait. Subsequent calls do properly respect the timeout value. One interesting note is that this only occurs when the timeout value is "close" to the actual execution time. That is, a very short timeout is indeed honored.
Steps to reproduce:
- Download a Java client, such as http://packages.couchbase.com/clients/java/1.4.3/Couchbase-Java-Client-1.4.3.zip
- Unzip
- Copy the attached App.java into the unzipped directory
- Compile and run:
javac -cp couchbase-client-1.4.3.jar:spymemcached-2.11.4.jar App.java
java -cp .:couchbase-client-1.4.3.jar:spymemcached-2.11.4.jar:jettison-1.1.jar:netty-3.5.5.Final.jar:commons-codec-1.5.jar:httpcore-4.3.jar:httpcore-nio-4.3.jar App > 143.txt
- Note the following output in the first group. It would be expected that the first call would timeout, but does not:
Timeout future is: false
Fetched 72 keys
Timeout set to:16
getMulti : Time taken=108ms
Timeout future is: false
Fetched 72 keys
Timeout set to:16
getMulti : Time taken=17ms
Timeout future is: false
Fetched 72 keys
Timeout set to:16
getMulti : Time taken=18ms
Timeout future is: false
Fetched 72 keys
Timeout set to:16
getMulti : Time taken=16ms
Exception:********************
Timeout future is: true
Operation timed out. - failing nodes: 10.4.2.107/10.4.2.107:11210, cbhost.domain/10.4.2.57:11210
Timeout set to:16
getMulti : Time taken=18ms
Timeout future is: false
Fetched 72 keys
Timeout set to:16
getMulti : Time taken=17ms
ASK - Determine why the first call does not honor the timeout, and ideally suggest a workaround for Couchbase Server 2.2.0, short of upgrading to Couchbase Server 2.5.1 (where the issue does not appear exist, and therefore looks to be a server-side issue)