Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A simple, asynchronous, single-threaded memcached client written in java.

SPY-163: Count down bulk get latch even when empty key list is provided.

Motivation
----------
When a empty iterator (or empty key list) is passed in to a get bulk operation,
a result is never returned and the thread is blocked because it waits on a
latch that will never be counted down (because no response will ever arrive).

Modifications
-------------
If no chunks with keys are sent out to the servers, the latch is initialized
to 0 right away so that the code doesn't need to wait at all.

Result
------
The code now returns properly with an empty map instead of blocking the thread
forever.

Change-Id: I0711c399d9f15010bc808e0f651ce6ad605c06f0
Reviewed-on: http://review.couchbase.org/36208
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
latest commit 04285ea97c
Michael Nitschinger daschl authored April 23, 2014 daschl committed April 23, 2014
Octocat-spinner-32 etc Changed buildfile to ivy/ant August 24, 2011
Octocat-spinner-32 ivy SPY-133: Add additional metrics support. September 04, 2013
Octocat-spinner-32 lib Changed buildfile to ivy/ant August 24, 2011
Octocat-spinner-32 src SPY-163: Count down bulk get latch even when empty key list is provided. April 23, 2014
Octocat-spinner-32 xdocs Link to the changelog. March 06, 2009
Octocat-spinner-32 .gitignore Ignore IntelliJ Idea .idea directory. September 02, 2013
Octocat-spinner-32 .gitreview Add .gitreview for gerrit-review and git-review scripts. May 07, 2013
Octocat-spinner-32 LICENSE.txt Changed buildfile to ivy/ant August 24, 2011
Octocat-spinner-32 README.markdown Removed server.type parameter January 08, 2012
Octocat-spinner-32 build.xml Add development pom.xml March 27, 2014
Octocat-spinner-32 ivy.xml SPY-133: Add additional metrics support. September 04, 2013
Octocat-spinner-32 pom.xml Add development pom.xml March 27, 2014
README.markdown

Building

Spymemcached can be compiled using Apache Ant by running the following command:

ant

This will generate binary, source, and javadoc jars in the build directory of the project.

To run the Spymemcached tests against Membase Server run the following command:

ant test -Dserver.type=membase

To test Spymemcached against Membase running on a different host use the following command:

ant test -Dserver.type=membase \
    -Dserver.address_v4=ip_address_of_membase

Testing

The latest version of spymemcached has a set of command line arguments that can be used to configure the location of your testing server. The arguments are listed below.

-Dserver.address_v4=ipv4_address_of_testing_server

This argument is used to specify the ipv4 address of your testing server. By default it is set to localhost.

-Dserver.address_v6=ipv6_address_of_testing_server

This argument is used to set the ipv6 address of your testing server. By default it is set to ::1. If an ipv6 address is specified then an ipv4 address must be specified otherwise there may be test failures.

-Dserver.port_number=port_number_of_memcached

This argument is used when memcahched is started on a port other than 11211

-Dtest.type=ci

This argument is used for CI testing where certain unit tests might be temporarily failing.

More Information

For more information about Spymemcached see the links below:

Project Page The

Spymemcached Project Home contains a wiki, issue tracker, and downloads section.

Github

The gitub page contains the latest Spymemcached source.

Couchbase.org

At couchbase.org you can find a download's section for the latest release as well as an extensive tutorial to help new users learn how to use Spymemcached.

Something went wrong with that request. Please try again.