Changes from release 2.6 to 2.7

Release of 2.7

Changes since the 2.6 series:

The 2.7 series gains significant new capabilities when using
binary protocol with Membase or forthcoming updates to

Starting with the 2.7 release, it is now possible to
instantiate a MemcachedClient from the REST interface
supported by Membase.  What this means is that if you have
one or more buckets in Membase, you can create
MemcachedClient objects to work with the buckets.  Furthermore,
if the cluster topology changes (i.e. a node is added or
removed), the client will automatically adjust to the new

This updated client also has support for other new Membase
operations, some of which will likely be in memcached
as well in a future release:
  touch - extend the expiration for a given item
  get and touch (a.k.a. gat) - get and touch an item
  getl - get and lock an item, with a lock expiration time

See for further

Many other minor changes were introduced in support of
this work, like handling temporary failures.  Notably,
this affects testing in that you now need a Membase
server running locally with a specific username
and password.  This is a limitation planned for removal
in future releases.

Some of these changes affected interfaces, which is why
the version number has been raised to 2.7 even though
2.6 was just recently released.

To support this new functionality, there are a few new
runtime dependencies:
netty 3.1.5 GA
jettison 1.1
Apache commons-codec 1.4

These are only required if you are using the new REST
interface and topology changes from Membase.

The majority of contributions to this release were
funded by Couchbase, Inc.  Thanks to the contributors:

Alexander Sokolovsky (9):
      Integrated jvbucket
      Added vbucket configuration parser from JSON.
      Added bucket monitor with response handler.
      Add a configuration provider for bucket updates.
      Added VbucketNodeLocator, keyed operation handling.
      Allow MemcachedClient and connections to be reconfigurable.
      Bugfixing of NOT_MY_VBUCKET handling
      Bugfixing not_my_vbucket occurs on optimized set
      Unit test and javadoc additions.

Matt Ingenthron (15):
      Buildfile changes to support Maven 2 artifact upload.
      If it is membase, do not test some things.
      Set the status when receiving ERR_NOT_MY_VBUCKET.
      Add both hostnames and IPs to the nodes map.
      Assert the node must exist when finding primary.
      Added check for moxi when testing.
      Refactor: not a collection of vbuckets, more of a configuration.
      Add a ConfigType via an enum.
      Allow config to handle cache as well.
      Change client ctor to detect vbucket usage from server.
      Extracted HTTP auth header to common place.
      Remove standard Authenticator and replace with simple auth header.
      Added logging for manipulation of nodesMap in VBucketLocator.
      Change ConfigType enum for clarity.
      Change a Bucket instance variable to final.

Mike Wiederhold (5):
      Added TEMP_FAIL handling to set operations
      Added touch operation
      Added getl operation
      Added Get And Touch Command
      Fixed .classpath file to include all dependencies

Bugs fixed/closed:

With others which can be listed here:
Version: GnuPG v1.4.10 (Darwin)


Changes from release 2.5 to 2.6

Release of 2.6

Changes since the 2.5 series:

The main change in 2.6 is logic with respect to timeout handling.
Timeout default is now 2500ms, rather than the old default of
1000ms.  The reason for this change is that a single network
retransmit could cause a longer than 1000ms wait, causing an
exception in the client application.

Additionally, some changes were integrated that help the client to
recover faster when a network connection problem does occur.  These
changes required interface changes, which is why the version has
been bumped to 2.6.

This change also allows client code to be able to tell if an
operation has timed out after being sent over the network or if
it has timed out before even being written to the network.

See issue 136 for more discussions on this topic.

Another feature relating to timeouts is that the continuous
timeout feature introduced in 2.5 has been moved to the connection
level, rather than for an entire client.  The default is that after
1000 timeout operations, a connection will be dropped and
reestablished if possible.  This addresses situations where a server
may fail, but the connection is not reset.

There are also performance improvements and new transcoder abilities
with asyncGetBulk now included.

One other significant bug fixed in this release was a problem with
finding an active node when there is a failed node and the
KetamaNodeLocator is in use.  With only two nodes, the previous
implementation had a 25% chance of not finding a working node
and failing with a timeout.  This has been changed such that now
there is a less than 1% chance it will not find a working node.

It should be noted that spy's algorithm here may be different
than libketama.  This is tracked under issue 117.  This is not a
new change however, and it's never been reported from running in

Thanks much to all of the new contributors to this release!  Thanks
in particular to Taso of Concur who spent much time writing tests
to isolate issue 175.

Andrey Kartashov (1):
      Move continuous timeout counter to individual connections.

Blair Zajac (9):
      Use a private static final byte array for "\r\n" instead of always
        converting the string into a byte array.
      No need to call MessageDigest#reset() on a brand new MessageDigest.
      Use a faster method to get a MD5 MessageDigest instance.
      Delete a duplicate unit test.
      Fix compilation with JDK 1.5.
      Add an iterator that returns a single element forever.
      Allow per-key transcoders to be used with asyncGetBulk().
      Minor performance improvement for bulk gets.
      Tiny performance improvement.

Boris Partensky (3):
      return partial data from timed out getBulk
      plug potential file descriptor leak
      support timeout based disconnects for bulk ops

Dustin Sallings (5):
      Some minor fixes to make eclipse happy with the code again.
      Some import cleanups.
      Avoid potential NPE as reported by eclipse.
      Compilation fix after spring de-generification.
      Removed a bit of dead test code.

Eran Harel (1):
      Spring FactoryBean support.

Luke Lappin (1):
      Do not use generics with Spring Factory Bean, be 2.5 compatible.

Matt Ingenthron (19):
      Changed ports in tests for non-listening to something higher.
      Do not write timedout operations to the MemcachedNode.
      Increased default timeout to 2500ms.
      Test for timeout from operation epoch.
      Test fixes after adding new timeout logic.
      Fix for stats sizes test.
      Recognize operation may be null at times.  e.g.: flush
      Add a TIMEDOUT state to ops and make callbacks correct.
      Fixes to testSyncGetTimeouts.
      Catch RuntimeException instead.
      Changed transcoder logging to more appropriate defaults.
      Warn when redistribute cannot find another node.
      Fixed small log typo.
      Added ability to see if op unsent but timedout.
      Fixed minor comment formatting.
      Fixed cancellation issue.
      Separate the KetamaIterator for future dynamic configuration.
      Search more with the KetamaIterator.
      Increase the maximum size allowed.  Issue 106.

ddlatham (1):
      Support daemon mode for TranscodeService threads.

Bugs fixed/closed:

With others which can be listed here:
Version: GnuPG v1.4.10 (Darwin)


Changes from release 2.4.2 to 2.5

Release of 2.5

Changes since the 2.4 series:

The main new feature of the 2.5 release is support for SASL auth
to go along with the same feature in the memcached 1.4.3 and later

There is also a new feature which can be used in conjunction with the
failure cancel mode to close all connections to memcached servers if
there are timeouts against a server.  This helps to recover from
situations where a memcached server in the list may hard fail.

Also notable is this commit:
cba26c1 If the String value of the socket address starts with a /, remove it.

This does affect Ketama hashing, as it was found there could be some
occasional mismatch with libketama.  A much larger test was added
and to a pretty large degree, compatibility with libketama's hashing is
assured.  Proceed with caution if you'll be running a mixed environment
of 2.5 and pre-2.5 spymemcached clients.  To get the old behavior by
default, a custom interface is easily implemented.

Additionally, there have been a number of bug fixes, comment cleanups
some new tests, and some consistency fixes.

Changes since 2.4.2:

Ahn Seong Hwa (2):
      New TCP connection timeout feature; if server fails completely, d/c.
      fix for useless check statement that is for continuous timeout exception counter

Blair Zajac (3):
      Be more generous in the strings that AddrUtil#getAddresses() will parse.
      Fix AddrUtilTest#testIPv6Host() hostname assertion.
      Fix consistency issue in ConnectionFactoryBuilder.isDaemon()

Dustin Sallings (19):
      Beginnings of SASL support.
      A slightly better model for SASL auth.
      Authentication should allow specification of a mechanism.
      Refactored broadcast to allow for node selection.
      Working multi-step auth.
      Refactored SASL auth for greater reuse.
      Added support for listing SASL mechanisms.
      Reformatted callback handler.
      Don't throw away an exception.
      Use the socket address as the realm.
      Better auth API, handles connection drops.
      Log the bug that causes reconnection on first connect.
      Replaced Long nanos with long millis for op queue block offer timeout.
      Ensure the factory builder can be used to specify enqueue block size.
      Get rid of special constructors for op enqueue timeouts.
      Do blocking inserts from the cache loader test.
      Auth fix for mechanisms that have an initial response.
      If the String value of the socket address starts with a /, remove it.
      A larger libketama extract for compatibility testing.

Greg Kim (1):
      Implementing read-only methods in MemcachedNodeROImpl - issue86

Kristian Eide (1):
      Allow user-specified wait time for availability of queue space.

Matt Ingenthron (14):
      Invert the ConnectionFactoryBuilderTest to go with new logic.
      Document unexpected incr/decr behavior.  Issue 48.
      Various Javadoc completeness.
      Docs for path to FailureModes on DefaultConnectionFactory. Issue 115.
      Clarify Future, issue 63.
      Clarify what is planned after a disconnect.
      Enhance MemcachedNode to know whether auth should happen.
      Changed AuthTest description to match reality.
      Manual test to ensure correct connection handling with SASL.
      Enhanced ConnectionFactoryBuilder test for auth.
      Minor fixes to SASL reconnect test.
      Handle auth failures more gracefully; maximum failures.
      Log operation failures as potential auth failures.
      Actually use the args to SASLConnectReconnect; shutdown nicely.

Bugs fixed/closed:

With others which can be listed here:
Version: GnuPG v1.4.10 (Darwin)


Changes from release 2.4.1 to 2.4.2

Release 2.4.2

Changes since 2.4.1:

Dustin Sallings (4):
      StorageListener should be public.
      Removed a debugging stdout thing.
      Handle operations that are writing and reading at the same time.
      Allow MemcachedClient and AsciiOperationFactory extensibility.

Kevin Lafferty (2):
      MemcachedConnection constructor should catch SocketException
      Support byte arrays in WhalinV1Transcoder.

Matt Ingenthron (1):
      Some javadoc cleanup in MemcachedClient examples.

Bugs fixed:
Version: GnuPG v1.4.9 (Darwin)


Changes from release 2.4 to 2.4.1

Release 2.4.1

Changes since 2.4:

* Build system now targets java 1.5.
  Java 1.5 is EOL'd at the end of this month, but I don't do anything
  special that would make it *not* work there.
Version: GnuPG v1.4.9 (Darwin)


Changes from release 2.3.1 to 2.4

Version 2.4

Changes since the 2.3 series.

Bug Fixes:

* Memcached node tracking.
  When a timeout occurs on an operation, the exception indicates the
  server node that was the intendend recipient of the operation.
* Fixed reconnect loss on multiple simultaneous connection failures.
  This is a rare occurrence, but the wrong thing would happen if two
  simultaneous reconnects were requeued for any reason.
* Fixed a race condition that occurred when tearing down a connection.
  There was a case where shutting down a connection would cause an NPE
  to get logged due to the a race between a selector check and the
  selector being shut down.  Unlikely to affect a running app, but
  it was still wrong.
* Handle initial connect failures.
  There were rare cases where an async connect would error instantly
  on the first attempt, but that connect wouldn't be retried.
* Sequence number wrapping bug.
  If you sent more than 2 billion or so requests to a node, the client
  would find itself in an infinite loop trying to cmoe up with a new
  opaque value.
* Suboptimal back-off algorithm.
  The previous back-off algorithm wouldn't create a reasonable
  reconnect curve.  The new one is more gradual and has a configurable
  maximum ceiling.


* ConnectionFactoryBuilder
  Rather than having to build a custom subclass of
  DefaultConnectionFactory to override behaviors, you can now use a
  ConnectionFactoryBuilder to easily assemble a ConnectionFactory as
  you want it.
* Mutation-only CAS mutator
  Previously, the CASMutator required an initial object to use if the
  object you were attempting to mutate wasn't found.  Now you can
  specify this as NULL and CASMutator will *only* mutate an existing
  object, but never create a new one.
* CacheLoader
  CacheLoader provides a couple of convenient mechanisms for
  efficiently loading bulk data.  I've seen many benchmarks trying to
  see how fast data can go into memcached through the client (as
  opposed to normal usage), but they do things to make it
  unnecessarily slow.  This should satisfy both benchmarking
  requirements and legitimate bulk loading requirements.
* KetamaNodeLocator is more configurable.
  The node data ketama uses for building a hash is configurable now in
  an effort to make consistent hashing work between java and C#.

Performance Enhancements:

* Disable Nagle Algorithm by Default
  The usage of the Nagle algorithm (tcpNoDelay) is now configurable
  and is configured off by default (Nagle algorithm off = tcpNoDelay
  on).  This should be more optimal for most configurations.
* Multi-set Escalation in the Binary Protocol
  With no changes to the API, multiple sequential sets will be
  escalated into a multi-set operation similar to multi-get.  In a
  bulk load test, this is generally around 2x faster.
* Asynchronous Transcoding Service
  A transcoder can request a transcoder service (effectively a
  threadpool) to asynchronously decode cache response objects both
  outside of the API and outside of the caller thread.


    40  Dustin Sallings
     1  Joseph Hart
     1  Lewis Zimmerman
     1  Wang Nan
     1  ciaranj
Version: GnuPG v1.4.9 (Darwin)


Changes from release 2.3 to 2.3.1

Release 2.3.1

Changes since 2.3:

* Fixed connection observeration.
  There was a condition where an exception could occur that wouldn't
  be tracked properly.  There's no automated test for this, but a test
  was constructed to manually verify the behavior with different
  server failure conditions.

* Fixed stat parsing for some stats.
  Tests were added to confirm that both stat responses that don't
  begin with STAT and stat values that contain spaces are handled

* Honor transcoder sizes.
  This adds a new requirement on the transcoder API to specify how
  many bytes the transcoder can store or read.  This both allows small
  transcoders to put size constraints in that will immediately throw
  an IllegalArgumentException when a result is too large to possibly
  work as well as allowing users to customize their memcached
  instances to allow for larger than normal objects.


     4  Dustin Sallings
Version: GnuPG v1.4.9 (Darwin)


Changes from release 2.2 to 2.3

Release 2.3.

Changes since 2.2:

* A Map interface to memcached
    This is somewhat limited, of course, in that you obviously can't
    list all of the mappings, but you can replace many Map
    usages with a memcached backed map.

* Failure Modes
    There are now three failure modes to choose from so you can decide
    what you want to do in the case of a node failure. (see
    FailureMode in the documentation for more details).

* Connection Observation
    You can register for callbacks that will notify you when a node
    goes up or down.  This is useful for things like notifying
    monitoring systems, or preventing a system from starting up until
    a required minimum number of memcached servers come online.

* Misc bug fixes and accessibility to memcached functionality.


    54  Dustin Sallings
     2  raykrueger
     1  Nick Brachet
     1  Valeri Felberg
Version: GnuPG v1.4.9 (Darwin)


Changes from release 2.1 to 2.2

Changes since 2.1:

* Data decoding occurs in caller threads instead of IO thread.
  This should greatly improve performance by spreading out the load to
  more threads. (Kristian Eide)
* MemcachedClientIF is added as an interface the client represents.
  This allows a client making use of the interface to mock the memcached
  interaction for better test coverage (Nelz)
* Binary protocol stat support (protocol wasn't complete until October 19).
* Async incr/decr with no default (Nick Brachet)
* Whalin V1 transcoder (Boris Partensky)
* Stats subcommands are now supported.
* Removed delete with hold support (pulled from server in 1.3).
* Miscellaneous bug fixes.


    22  Dustin Sallings
     2  Boris Partensky
     2  Kristian Eide
     2  Nelz
     2  Nick Brachet
     1  Robey Pointer
Version: GnuPG v1.4.9 (Darwin)


Changes from release 2.0.2 to 2.1

2.1 release

Main features since 2.0:

* Operation timeouts for blocking operations.
* Support for append and prepend.
* Optional Whalin compatible transcoder.
* Canned connection factory for Ketama compatible consistent hashing.
* More tweakability with respect to operation queue sizes.
Version: GnuPG v1.4.9 (Darwin)


Changes from release 2.0.1 to 2.0.2

Binary protocol updates.
Version: GnuPG v1.4.8 (Darwin)


Changes from release 2.0 to 2.0.1

Some minor post-2.0 fixes.

* Binary protocol changes re alignment (as released in memcached 1.3.0)
* More input validation when constructing a client.
* Transcoder flag consistency.
* More tests
Version: GnuPG v1.4.8 (Darwin)


Changes from release 1.4 to 2.0

2.0 has been a long time coming.

The initial reason for it to exist was protocol abstraction (specifically to
implement the binary protocol).  The slowness of the binary protocol release
has kept this dangling for quite a while.

Although there still isn't a released binary server, I want to get this release
out because there are a lot of other good things that have happened since:

 * CAS
 * Hash implementations and tests
 * node location algorithms (e.g. ketama consistent hashing)
 * Lots of fixes.

There are still things to do, but much of what people have been asking for can
be found within. this release and all of the bugs that have been reported
to-date have been fixed.
Version: GnuPG v1.4.8 (Darwin)


Changes from release 1.3.1 to 1.4

release 1.4

Changes from release 1.3 to 1.3.1

release 1.3.1

Changes from release 1.2 to 1.3

release 1.3

Changes from release 1.1 to 1.2

release 1.2

Changes from release 1.0.44 to 1.1

release 1.1

Changes from release 1.0.43 to 1.0.44

release 1.0.44

Changes from release 1.0.42 to 1.0.43

release 1.0.43

Changes from release 1.0.41 to 1.0.42

release 1.0.42

Changes from release 1.0.40 to 1.0.41

release 1.0.41

Changes from release 1.0.39 to 1.0.40

release 1.0.40

Changes from release 1.0.38 to 1.0.39

release 1.0.39

Changes from release 1.0.37 to 1.0.38

release 1.0.38

Changes from release 1.0.36 to 1.0.37

release 1.0.37

Changes from release 1.0.34 to 1.0.36

release 1.0.36

Release 1.0.34

release 1.0.34